"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[5502,6732],{26184:(e,t,o)=>{o.d(t,{Z:()=>c});var a=o(69307),n=o(70444);const c=(0,a.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(n.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"}))},65663:(e,t,o)=>{o.d(t,{U:()=>w,e:()=>h});var a=o(69307),n=o(83849),c=o.n(n),r=o(59838),l=o(76292),s=o.n(l),i=o(7862),m=o.n(i),d=o(86020),u=o(55609),p=o(92819);class _ extends a.Component{render(){const{className:e,hasAction:t,hasDate:o,hasSubtitle:n,lines:r}=this.props,l=c()("woocommerce-activity-card is-loading",e);return(0,a.createElement)("div",{className:l,"aria-hidden":!0},(0,a.createElement)("span",{className:"woocommerce-activity-card__icon"},(0,a.createElement)("span",{className:"is-placeholder"})),(0,a.createElement)("div",{className:"woocommerce-activity-card__header"},(0,a.createElement)("div",{className:"woocommerce-activity-card__title is-placeholder"}),n&&(0,a.createElement)("div",{className:"woocommerce-activity-card__subtitle is-placeholder"}),o&&(0,a.createElement)("div",{className:"woocommerce-activity-card__date"},(0,a.createElement)("span",{className:"is-placeholder"}))),(0,a.createElement)("div",{className:"woocommerce-activity-card__body"},(0,p.range)(r).map((e=>(0,a.createElement)("span",{className:"is-placeholder",key:e})))),t&&(0,a.createElement)("div",{className:"woocommerce-activity-card__actions"},(0,a.createElement)("span",{className:"is-placeholder"})))}}_.propTypes={className:m().string,hasAction:m().bool,hasDate:m().bool,hasSubtitle:m().bool,lines:m().number},_.defaultProps={hasAction:!1,hasDate:!1,hasSubtitle:!1,lines:1};const h=_;class w extends a.Component{getCard(){const{actions:e,className:t,children:o,date:n,icon:r,subtitle:l,title:i,unread:m}=this.props,u=c()("woocommerce-activity-card",t),p=Array.isArray(e)?e:[e],_=/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(n)?s().utc(n).fromNow():n;return(0,a.createElement)("section",{className:u},m&&(0,a.createElement)("span",{className:"woocommerce-activity-card__unread"}),r&&(0,a.createElement)("span",{className:"woocommerce-activity-card__icon","aria-hidden":!0},r),i&&(0,a.createElement)("header",{className:"woocommerce-activity-card__header"},(0,a.createElement)(d.H,{className:"woocommerce-activity-card__title"},i),l&&(0,a.createElement)("div",{className:"woocommerce-activity-card__subtitle"},l),_&&(0,a.createElement)("span",{className:"woocommerce-activity-card__date"},_)),o&&(0,a.createElement)(d.Section,{className:"woocommerce-activity-card__body"},o),e&&(0,a.createElement)("footer",{className:"woocommerce-activity-card__actions"},p.map(((e,t)=>(0,a.cloneElement)(e,{key:t})))))}render(){const{onClick:e}=this.props;return e?(0,a.createElement)(u.Button,{className:"woocommerce-activity-card__button",onClick:e},this.getCard()):this.getCard()}}w.propTypes={actions:m().oneOfType([m().arrayOf(m().element),m().element]),onClick:m().func,className:m().string,children:m().node,date:m().string,icon:m().node,subtitle:m().node,title:m().oneOfType([m().string,m().node]),unread:m().bool},w.defaultProps={icon:(0,a.createElement)(r.Z,{size:48}),unread:!1}},15482:(e,t,o)=>{o.d(t,{Z:()=>d});var a=o(69307),n=o(83849),c=o.n(n),r=o(7862),l=o.n(r),s=o(14812),i=o(86020);class m extends a.Component{render(){const{className:e,menu:t,subtitle:o,title:n,unreadMessages:r}=this.props,l=c()({"woocommerce-layout__inbox-panel-header":o,"woocommerce-layout__activity-panel-header":!o},e),i=r||0;return(0,a.createElement)("div",{className:l},(0,a.createElement)("div",{className:"woocommerce-layout__inbox-title"},(0,a.createElement)(s.Text,{size:16,weight:600,color:"#23282d"},n),(0,a.createElement)(s.Text,{variant:"button",weight:"600",size:"14",lineHeight:"20px"},i>0&&(0,a.createElement)("span",{className:"woocommerce-layout__inbox-badge"},r))),(0,a.createElement)("div",{className:"woocommerce-layout__inbox-subtitle"},o&&(0,a.createElement)(s.Text,{variant:"body.small",size:"14",lineHeight:"20px"},o)),t&&(0,a.createElement)("div",{className:"woocommerce-layout__activity-panel-header-menu"},t))}}m.propTypes={className:l().string,unreadMessages:l().number,title:l().string.isRequired,subtitle:l().string,menu:l().shape({type:l().oneOf([i.EllipsisMenu])})};const d=m},37015:(e,t,o)=>{o.r(t),o.d(t,{HelpPanel:()=>y,SETUP_TASK_HELP_ITEMS_FILTER:()=>g,default:()=>k});var a=o(69307),n=o(65736),c=o(14812),r=o(9818),l=o(92694),s=o(23374),i=o(89015),m=o(83619),d=o(92819),u=o(86020),p=o(67221),_=o(82422),h=o(14599),w=o(15482),E=o(82580);const g="woocommerce_admin_setup_task_help_items";function v(e,t){const{taskName:o}=e;t&&e.recordEvent("help_panel_click",{task_name:o||"homescreen",link:t.currentTarget.href})}const y=e=>{const{taskName:t}=e;(0,a.useEffect)((()=>{e.recordEvent("help_panel_open",{task_name:t||"homescreen"})}),[t]);const o=function(e){const t=function(e){const{taskName:t}=e;switch(t){case"products":return[{title:(0,n.__)("Adding and Managing Products","woocommerce"),link:"https://woocommerce.com/document/managing-products/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Import products using the CSV Importer and Exporter","woocommerce"),link:"https://woocommerce.com/document/product-csv-importer-exporter/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Migrate products using Cart2Cart","woocommerce"),link:"https://woocommerce.com/products/cart2cart/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Learn more about setting up products","woocommerce"),link:"https://woocommerce.com/documentation/plugins/woocommerce/getting-started/setup-products/?utm_source=help_panel&utm_medium=product"}];case"appearance":return[{title:(0,n.__)("Showcase your products and tailor your shopping experience using Blocks","woocommerce"),link:"https://woocommerce.com/document/woocommerce-blocks/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Manage Store Notice, Catalog View and Product Images","woocommerce"),link:"https://woocommerce.com/document/woocommerce-customizer/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("How to choose and change a theme","woocommerce"),link:"https://woocommerce.com/document/choose-change-theme/?utm_source=help_panel&utm_medium=product"}];case"shipping":return function(e){let{activePlugins:t,countryCode:o}=e;const a="US"===o&&!t.includes("woocommerce-services");return[{title:(0,n.__)("Setting up Shipping Zones","woocommerce"),link:"https://woocommerce.com/document/setting-up-shipping-zones/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Core Shipping Options","woocommerce"),link:"https://woocommerce.com/documentation/plugins/woocommerce/getting-started/shipping/core-shipping-options/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Product Shipping Classes","woocommerce"),link:"https://woocommerce.com/document/product-shipping-classes/?utm_source=help_panel&utm_medium=product"},a&&{title:(0,n.__)("WooCommerce Shipping setup and configuration","woocommerce"),link:"https://woocommerce.com/document/woocommerce-shipping-and-tax/?utm_source=help_panel&utm_medium=product#section-3"},{title:(0,n.__)("Learn more about configuring your shipping settings","woocommerce"),link:"https://woocommerce.com/document/plugins/woocommerce/getting-started/shipping/?utm_source=help_panel&utm_medium=product"}].filter(Boolean)}(e);case"tax":return function(e){const{countryCode:t,taskLists:o}=e,a=o.reduce(((e,t)=>[...e,...t.tasks]),[]).find((e=>"tax"===e.id));if(!a)return;const{additionalData:c}=a,{woocommerceTaxCountries:r=[],taxJarActivated:l}=c,s=!l&&r.includes(t);return[{title:(0,n.__)("Setting up Taxes in WooCommerce","woocommerce"),link:"https://woocommerce.com/document/setting-up-taxes-in-woocommerce/?utm_source=help_panel&utm_medium=product"},s&&{title:(0,n.__)("Automated Tax calculation using WooCommerce Tax","woocommerce"),link:"https://woocommerce.com/document/woocommerce-services/?utm_source=help_panel&utm_medium=product#section-10"}].filter(Boolean)}(e);case"payments":return function(e){const{paymentGatewaySuggestions:t}=e;return[{title:(0,n.__)("Which Payment Option is Right for Me?","woocommerce"),link:"https://woocommerce.com/document/premium-payment-gateway-extensions/?utm_source=help_panel&utm_medium=product"},t.woocommerce_payments&&{title:(0,n.__)("WooPayments Start Up Guide","woocommerce"),link:"https://woocommerce.com/document/payments/?utm_source=help_panel&utm_medium=product"},t.woocommerce_payments&&{title:(0,n.__)("WooPayments FAQs","woocommerce"),link:"https://woocommerce.com/documentation/woocommerce-payments/woocommerce-payments-faqs/?utm_source=help_panel&utm_medium=product"},t.stripe&&{title:(0,n.__)("Stripe Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/stripe/?utm_source=help_panel&utm_medium=product"},t["ppcp-gateway"]&&{title:(0,n.__)("PayPal Checkout Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/2-0/woocommerce-paypal-payments/?utm_medium=product#section-3"},t.square_credit_card&&{title:(0,n.__)("Square - Get started","woocommerce"),link:"https://woocommerce.com/document/woocommerce-square/?utm_source=help_panel&utm_medium=product"},t.kco&&{title:(0,n.__)("Klarna - Introduction","woocommerce"),link:"https://woocommerce.com/document/klarna-checkout/?utm_source=help_panel&utm_medium=product"},t.klarna_payments&&{title:(0,n.__)("Klarna - Introduction","woocommerce"),link:"https://woocommerce.com/document/klarna-payments/?utm_source=help_panel&utm_medium=product"},t.payfast&&{title:(0,n.__)("Payfast Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/payfast-payment-gateway/?utm_source=help_panel&utm_medium=product"},t.eway&&{title:(0,n.__)("Eway Setup and Configuration","woocommerce"),link:"https://woocommerce.com/document/eway/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Direct Bank Transfer (BACS)","woocommerce"),link:"https://woocommerce.com/document/bacs/?utm_source=help_panel&utm_medium=product"},{title:(0,n.__)("Cash on Delivery","woocommerce"),link:"https://woocommerce.com/document/cash-on-delivery/?utm_source=help_panel&utm_medium=product"}].filter(Boolean)}(e);case"marketing":return function(e){const{activePlugins:t}=e;return[t.includes("mailpoet")&&{title:(0,n.__)("Get started with Mailpoet","woocommerce"),link:"https://kb.mailpoet.com/category/114-getting-started"},t.includes("google-listings-and-ads")&&{title:(0,n.__)("Set up Google Listing & Ads","woocommerce"),link:"https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started"},t.includes("pinterest-for-woocommerce")&&{title:(0,n.__)("Set up Pinterest for WooCommerce","woocommerce"),link:"https://woocommerce.com/products/pinterest-for-woocommerce/"},t.includes("mailchimp-for-woocommerce")&&{title:(0,n.__)("Connect Mailchimp for WooCommerce","woocommerce"),link:"https://mailchimp.com/help/connect-or-disconnect-mailchimp-for-woocommerce/"},t.includes("creative-mail-by-constant-contact")&&{title:(0,n.__)("Set up Creative Mail for WooCommerce","woocommerce"),link:"https://app.creativemail.com/kb/help/WooCommerce"}].filter(Boolean)}(e);default:return[{title:(0,n.__)("Get Support","woocommerce"),link:"https://woocommerce.com/my-account/create-a-ticket/?utm_medium=product"},{title:(0,n.__)("Home Screen","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product"},{title:(0,n.__)("Inbox","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-4"},{title:(0,n.__)("Stats Overview","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-5"},{title:(0,n.__)("Store Management","woocommerce"),link:"https://woocommerce.com/document/home-screen/?utm_medium=product#section-10"},{title:(0,n.__)("Store Setup Checklist","woocommerce"),link:"https://woocommerce.com/document/woocommerce-setup-wizard?utm_medium=product#store-setup-checklist"}]}}(e),o={title:(0,n.__)("WooCommerce Docs","woocommerce"),link:"https://woocommerce.com/documentation/?utm_source=help_panel&utm_medium=product"};t.push(o);const r=(0,l.applyFilters)(g,t,e.taskName,e);let u=Array.isArray(r)?r.filter((e=>e instanceof Object&&e.title&&e.link)):[];u.length||(u=[o]);const p=(0,d.partial)(v,e);return u.map((e=>{var t,o;return{title:(0,a.createElement)(c.Text,{as:"div",variant:"button",weight:"600",size:"14",lineHeight:"20px"},e.title),before:(0,a.createElement)(s.Z,{icon:i.Z}),after:(0,a.createElement)(s.Z,{icon:m.Z}),linkType:null!==(t=e.linkType)&&void 0!==t?t:"external",target:null!==(o=e.target)&&void 0!==o?o:"_blank",href:e.link,onClick:p}}))}(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(w.Z,{title:(0,n.__)("Documentation","woocommerce")}),(0,a.createElement)(u.Section,null,(0,a.createElement)(u.List,{items:o,className:"woocommerce-quick-links__list"})))};y.defaultProps={recordEvent:h.recordEvent};const k=(0,_.qC)((0,r.withSelect)((e=>{const{getSettings:t}=e(p.SETTINGS_STORE_NAME),{getActivePlugins:o}=e(p.PLUGINS_STORE_NAME),{general:a={}}=t("general"),n=o(),c=e(p.ONBOARDING_STORE_NAME).getPaymentGatewaySuggestions().reduce(((e,t)=>{const{id:o}=t;return e[o]=!0,e}),{}),r=e(p.ONBOARDING_STORE_NAME).getTaskLists();return{activePlugins:n,countryCode:(0,E.so)(a.woocommerce_default_country),paymentGatewaySuggestions:c,taskLists:r}})))(y)},54541:(e,t,o)=>{o.d(t,{A:()=>u,Z:()=>d});var a=o(76292),n=o.n(a),c=o(92819),r=o(81921),l=o(67221),s=o(10431),i=o(81595),m=o(74617);const d=e=>{let{indicator:t,primaryData:o,secondaryData:a,currency:n,formatAmount:r,persistedQuery:l}=e;const d=(0,c.find)(o.data,(e=>e.stat===t.stat)),u=(0,c.find)(a.data,(e=>e.stat===t.stat));if(!d||!u)return{};const p=d._links&&d._links.report[0]&&d._links.report[0].href||"",_=function(e,t,o){return e?"/jetpack"===e?(0,m.getAdminLink)("admin.php?page=jetpack#/dashboard"):(0,s.getNewPath)(t,e,{chart:o.chart}):""}(p,l,d),h="/jetpack"===p?"wp-admin":"wc-admin",w="currency"===d.format,E=(0,i.calculateDelta)(d.value,u.value);return{primaryValue:w?r(d.value):(0,i.formatValue)(n,d.format,d.value),secondaryValue:w?r(u.value):(0,i.formatValue)(n,u.format,u.value),delta:E,reportUrl:_,reportUrlType:h}},u=(e,t,o,a)=>{const{getReportItems:c,getReportItemsError:s,isResolving:i}=e(l.REPORTS_STORE_NAME),{woocommerce_default_date_range:m}=e(l.SETTINGS_STORE_NAME).getSetting("wc_admin","wcAdminSettings"),d=(0,r.getCurrentDates)(o,m),u=d.primary.before,p=d.secondary.before,_=t.map((e=>e.stat)).join(","),h=(0,l.getFilterQuery)({filters:a,query:o}),w={...h,after:(0,r.appendTimestamp)(d.primary.after,"start"),before:(0,r.appendTimestamp)(u,u.isSame(n()(),"day")?"now":"end"),stats:_},E={...h,after:(0,r.appendTimestamp)(d.secondary.after,"start"),before:(0,r.appendTimestamp)(p,p.isSame(n()(),"day")?"now":"end"),stats:_};return{primaryData:c("performance-indicators",w),primaryError:s("performance-indicators",w)||null,primaryRequesting:i("getReportItems",["performance-indicators",w]),secondaryData:c("performance-indicators",E),secondaryError:s("performance-indicators",E)||null,secondaryRequesting:i("getReportItems",["performance-indicators",E]),defaultDateRange:m}}},12418:(e,t,o)=>{o.r(t),o.d(t,{default:()=>ht});var a=o(69307),n=o(94333),c=o(9818),r=o(67221),l=o(10431),s=o(83849),i=o.n(s),m=o(7862),d=o.n(m),u=o(65736),p=o(15482),_=o(86020),h=o(55609),w=o(14599),E=o(92819),g=o(22983),v=o(75283),y=o(74617),k=o(17844),f=o(65663),N=o(73463),S=o(82580);function C(e){(0,w.recordEvent)(`activity_panel_orders_${e}`,{})}function b(e){let{unreadOrdersCount:t,orderStatuses:o}=e;const n=(0,a.useMemo)((()=>({page:1,per_page:5,status:o,_fields:["id","number","currency","status","total","customer","line_items","customer_id","date_created_gmt"]})),[o]),s=(0,a.useContext)(k.CurrencyContext),{orders:i=[],isRequesting:m,isError:d,customerItems:p}=(0,c.useSelect)((e=>{const{getOrders:a,hasFinishedResolution:c,getOrdersError:l}=e(r.ORDERS_STORE_NAME),{getItems:s}=e(r.ITEMS_STORE_NAME);if(!o.length&&0===t)return{isRequesting:!1};const i=a(n,null),m=c("getOrders",[n]);if(m||null===t||null===i)return{isError:Boolean(l(n)),isRequesting:!0,orderStatuses:o};const d=s("customers",{users:i.map((e=>e.customer_id)).filter((e=>0!==e)),_fields:["id","name","country","user_id"]});return{orders:i,isError:Boolean(l(i)),isRequesting:m,orderStatuses:o,customerItems:d}}));if(d){if(!o.length&&window.wcAdminFeatures.analytics)return(0,a.createElement)(_.EmptyContent,{title:(0,u.__)("You currently don't have any actionable statuses. To display orders here, select orders that require further review in settings.","woocommerce"),actionLabel:(0,u.__)("Settings","woocommerce"),actionURL:(0,y.getAdminLink)("admin.php?page=wc-admin&path=/analytics/settings")});const e=(0,u.__)("There was an error getting your orders. Please try again.","woocommerce"),t=(0,u.__)("Reload","woocommerce"),n=()=>{window.location.reload()};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:n}))}const h=p?Array.from(p,(e=>{let[,t]=e;return t})):[];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.Section,null,m?(0,a.createElement)(f.e,{className:"woocommerce-order-activity-card",hasAction:!0,hasDate:!0,lines:1}):function(e,t,o){if(0===e.length)return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(f.U,{className:"woocommerce-empty-activity-card",title:"",icon:""},(0,a.createElement)("span",{className:"woocommerce-order-empty__success-icon",role:"img","aria-labelledby":"woocommerce-order-empty-message"},"🎉"),(0,a.createElement)(_.H,{id:"woocommerce-order-empty-message"},(0,u.__)("You’ve fulfilled all your orders","woocommerce"))),(0,a.createElement)(_.Link,{href:"edit.php?post_type=shop_order",onClick:()=>C("orders_manage"),className:"woocommerce-layout__activity-panel-outbound-link woocommerce-layout__activity-panel-empty",type:"wp-admin"},(0,u.__)("Manage all orders","woocommerce")));const n=e=>{const{name:t}=e||{};return t?`{{customerLink}}${t}{{/customerLink}}`:""},c=e=>{const{id:o,number:c,customer_id:r}=e,s=t.find((e=>e.user_id===r))||{};let i=null;return s&&s.id&&(i=window.wcAdminFeatures.analytics?(0,l.getNewPath)({},"/analytics/customers",{filter:"single_customer",customers:s.id}):(0,y.getAdminLink)("user-edit.php?user_id="+s.id)),(0,a.createElement)(a.Fragment,null,(0,v.Z)({mixedString:(0,u.sprintf)((0,u.__)("{{orderLink}}Order #%(orderNumber)s{{/orderLink}} %(customerString)s","woocommerce"),{orderNumber:c,customerString:n(s)}),components:{orderLink:(0,a.createElement)(_.Link,{href:(0,y.getAdminLink)("post.php?action=edit&post="+o),onClick:()=>C("order_number"),type:"wp-admin"}),destinationFlag:s&&s.country?(0,a.createElement)(_.Flag,{code:s&&s.country,round:!1}):null,customerLink:i?(0,a.createElement)(_.Link,{href:i,onClick:()=>C("customer_name"),type:"wc-admin"}):(0,a.createElement)("span",null)}}))},r=[];return e.forEach((e=>{const{date_created_gmt:t,line_items:n,id:l}=e,s=n?n.length:0;r.push((0,a.createElement)(f.U,{key:l,className:"woocommerce-order-activity-card",title:c(e),date:t,onClick:e=>{let{target:t}=e;C("orders_begin_fulfillment"),t.href||(window.location.href=(0,y.getAdminLink)(`post.php?action=edit&post=${l}`))},subtitle:(0,a.createElement)("div",null,(0,a.createElement)("span",null,(0,u.sprintf)((0,u._n)("%d product","%d products",s,"woocommerce"),s)),(0,a.createElement)("span",null,o(e.total,e.currency)))},(0,a.createElement)(_.OrderStatus,{order:e,orderStatusMap:(0,N.O3)("orderStatuses",{})})))})),(0,a.createElement)(a.Fragment,null,r,(0,a.createElement)(_.Link,{href:"edit.php?post_type=shop_order",className:"woocommerce-layout__activity-panel-outbound-link",onClick:()=>C("orders_manage"),type:"wp-admin"},(0,u.__)("Manage all orders","woocommerce")))}(i,h,((e,t)=>{if(!t)return null;const o=(0,S.so)(t),{currencySymbols:a={},localeInfo:n={}}=(0,N.O3)("onboarding",{}),c=s.getDataForCountry(o,n,a);return s.setCurrency(c),s.formatAmount(e)}))))}b.propTypes={isError:d().bool,isRequesting:d().bool,unreadOrdersCount:d().number,orders:d().array.isRequired,orderStatuses:d().array},b.defaultProps={orders:[],isError:!1,isRequesting:!1};const T=b;var M=o(39630),O=o(76292),R=o.n(O);class L extends a.Component{constructor(e){super(e),this.state={quantity:e.product.stock_quantity,editing:!1,edited:!1},this.beginEdit=this.beginEdit.bind(this),this.cancelEdit=this.cancelEdit.bind(this),this.onQuantityChange=this.onQuantityChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.onSubmit=this.onSubmit.bind(this)}recordStockEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,w.recordEvent)(`activity_panel_stock_${e}`,t)}beginEdit(){const{product:e}=this.props;this.setState({editing:!0,quantity:e.stock_quantity},(()=>{this.quantityInput&&this.quantityInput.focus()})),this.recordStockEvent("update_stock")}cancelEdit(){const{product:e}=this.props;this.setState({editing:!1,quantity:e.stock_quantity}),this.recordStockEvent("cancel")}handleKeyDown(e){e.keyCode===M.ESCAPE&&this.cancelEdit()}onQuantityChange(e){this.setState({quantity:e.target.value})}async onSubmit(){const{product:e,updateProductStock:t,createNotice:o}=this.props,a=parseInt(this.state.quantity,10);e.stock_quantity!==a?(this.setState({editing:!1,edited:!0}),await t(e,a)?o("success",(0,u.sprintf)((0,u.__)("%s stock updated","woocommerce"),e.name),{actions:[{label:(0,u.__)("Undo","woocommerce"),onClick:()=>{t(e,e.stock_quantity),this.recordStockEvent("undo")}}]}):o("error",(0,u.sprintf)((0,u.__)("%s stock could not be updated","woocommerce"),e.name)),this.recordStockEvent("save",{quantity:a})):this.setState({editing:!1})}getActions(){const{editing:e}=this.state;return e?[(0,a.createElement)(h.Button,{key:"save",type:"submit",isPrimary:!0},(0,u.__)("Save","woocommerce")),(0,a.createElement)(h.Button,{key:"cancel",type:"reset"},(0,u.__)("Cancel","woocommerce"))]:[(0,a.createElement)(h.Button,{key:"update",isSecondary:!0,onClick:this.beginEdit},(0,u.__)("Update stock","woocommerce"))]}getBody(){const{product:e}=this.props,{editing:t,quantity:o}=this.state;return t?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.BaseControl,{className:"woocommerce-stock-activity-card__edit-quantity"},(0,a.createElement)("input",{className:"components-text-control__input",type:"number",value:o,onKeyDown:this.handleKeyDown,onChange:this.onQuantityChange,ref:e=>{this.quantityInput=e}})),(0,a.createElement)("span",null,(0,u.__)("in stock","woocommerce"))):(0,a.createElement)("span",{className:i()("woocommerce-stock-activity-card__stock-quantity",{"out-of-stock":e.stock_quantity<1})},(0,u.sprintf)((0,u.__)("%d in stock","woocommerce"),e.stock_quantity))}render(){const{product:e}=this.props,{edited:t,editing:o}=this.state,n=(0,N.O3)("notifyLowStockAmount",0),c=Number.isFinite(e.low_stock_amount)?e.low_stock_amount:n,r=e.stock_quantity<=c,l=e.last_order_date?(0,u.sprintf)((0,u.__)("Last ordered %s","woocommerce"),R().utc(e.last_order_date).fromNow()):null;if(!r&&!t)return null;const s=(0,a.createElement)(_.Link,{href:"post.php?action=edit&post="+(e.parent_id||e.id),onClick:()=>this.recordStockEvent("product_name"),type:"wp-admin"},e.name);let m=null;"variation"===e.type&&(m=Object.values(e.attributes).map((e=>e.option)).join(", "));const d=(0,E.get)(e,["images",0])||(0,E.get)(e,["image"]),p=i()("woocommerce-stock-activity-card__image-overlay__product",{"is-placeholder":!d||!d.src}),h=(0,a.createElement)("div",{className:"woocommerce-stock-activity-card__image-overlay"},(0,a.createElement)("div",{className:p},(0,a.createElement)(_.ProductImage,{product:e}))),w=i()("woocommerce-stock-activity-card",{"is-dimmed":!o&&!r}),g=(0,a.createElement)(f.U,{className:w,title:s,subtitle:m,icon:h,date:l,actions:this.getActions()},this.getBody());return o?(0,a.createElement)("form",{onReset:this.cancelEdit,onSubmit:this.onSubmit},g):g}}const z={page:1,per_page:5,status:"publish",_fields:["attributes","id","images","last_order_date","low_stock_amount","name","parent_id","stock_quantity","type"]};class A extends a.Component{constructor(e){super(e),this.updateStock=this.updateStock.bind(this)}async updateStock(e,t){const{invalidateResolution:o,updateProductStock:a,products:n}=this.props,c=await a(e,t);return c&&(o("getItems",["products/low-in-stock",z]),n.length<2&&o("getItemsTotalCount",["products/low-in-stock",g.Ox,null])),c}renderProducts(){const{products:e,createNotice:t}=this.props;return e.map((e=>(0,a.createElement)(L,{key:e.id,product:e,updateProductStock:this.updateStock,createNotice:t})))}render(){const{lowStockProductsCount:e,isError:t,isRequesting:o,products:n}=this.props;if(t){const e=(0,u.__)("There was an error getting your low stock products. Please try again.","woocommerce"),t=(0,u.__)("Reload","woocommerce"),o=()=>{window.location.reload()};return(0,a.createElement)(_.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:o})}if(o||!n.length){const t=Math.min(5,null!=e?e:1),o=Array.from(new Array(t)).map(((e,t)=>(0,a.createElement)(f.e,{key:t,className:"woocommerce-stock-activity-card",hasAction:!0,lines:1})));return(0,a.createElement)(_.Section,null,o)}return(0,a.createElement)(_.Section,null,this.renderProducts())}}A.propTypes={lowStockProductsCount:d().number,products:d().array.isRequired,isError:d().bool,isRequesting:d().bool},A.defaultProps={products:[],isError:!1,isRequesting:!1};const I=(0,n.compose)((0,c.withSelect)((e=>{const{getItems:t,getItemsError:o,isResolving:a}=e(r.ITEMS_STORE_NAME);return{products:Array.from(t("products/low-in-stock",z).values()),isError:Boolean(o("products/low-in-stock",z)),isRequesting:a("getItems",["products/low-in-stock",z])}})),(0,c.withDispatch)((e=>{const{invalidateResolution:t,updateProductStock:o}=e(r.ITEMS_STORE_NAME),{createNotice:a}=e("core/notices");return{createNotice:a,invalidateResolution:t,updateProductStock:o}})))(A);var P=o(7725),x=o(54989);const U=()=>(0,a.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"1",y:"1",width:"14",height:"14"},(0,a.createElement)("path",{d:"M7.99992 1.33301C4.31992 1.33301 1.33325 4.31967 1.33325 7.99967C1.33325 11.6797 4.31992 14.6663 7.99992 14.6663C11.6799 14.6663 14.6666 11.6797 14.6666 7.99967C14.6666 4.31967 11.6799 1.33301 7.99992 1.33301ZM7.99992 13.333C5.05992 13.333 2.66659 10.9397 2.66659 7.99967C2.66659 5.05967 5.05992 2.66634 7.99992 2.66634C10.9399 2.66634 13.3333 5.05967 13.3333 7.99967C13.3333 10.9397 10.9399 13.333 7.99992 13.333ZM6.66658 9.44634L11.0599 5.05301L11.9999 5.99967L6.66658 11.333L3.99992 8.66634L4.93992 7.72634L6.66658 9.44634Z",fill:"white"})),(0,a.createElement)("g",{mask:"url(#mask0)"},(0,a.createElement)("rect",{width:"16",height:"16",fill:"#4AB866"})));var D=o(32008),F=o(14138);const H={page:1,per_page:F.X6,status:"hold",_embed:1};class q extends a.Component{recordReviewEvent(e,t){(0,w.recordEvent)(`reviews_${e}`,t||{})}deleteReview(e){const{deleteReview:t,createNotice:o,updateReview:a,clearReviewsCache:n}=this.props;e&&t(e).then((()=>{n(),o("success",(0,u.__)("Review successfully deleted.","woocommerce"),{actions:[{label:(0,u.__)("Undo","woocommerce"),onClick:()=>{a(e,{status:"untrash"},{_embed:1}).then((()=>n()))}}]})})).catch((()=>{o("error",(0,u.__)("Review could not be deleted.","woocommerce"))}))}updateReviewStatus(e,t,o){const{createNotice:a,updateReview:n,clearReviewsCache:c}=this.props;e&&n(e,{status:t}).then((()=>{c(),a("success",(0,u.__)("Review successfully updated.","woocommerce"),{actions:[{label:(0,u.__)("Undo","woocommerce"),onClick:()=>{n(e,{status:o},{_embed:1}).then((()=>c()))}}]})})).catch((()=>{a("error",(0,u.__)("Review could not be updated.","woocommerce"))}))}renderReview(e){const t=e&&e._embedded&&e._embedded.up&&e._embedded.up[0]||null;if(e.isUpdating)return(0,a.createElement)(f.e,{key:e.id,className:"woocommerce-review-activity-card",hasAction:!0,hasDate:!0,lines:1});if((0,E.isNull)(t)||e.status!==H.status)return null;const o=(0,v.Z)({mixedString:(0,u.sprintf)((0,u.__)("{{authorLink}}%s{{/authorLink}}{{verifiedCustomerIcon/}} reviewed {{productLink}}%s{{/productLink}}","woocommerce"),e.reviewer,t.name),components:{productLink:(0,a.createElement)(_.Link,{href:t.permalink,onClick:()=>this.recordReviewEvent("product"),type:"external"}),authorLink:(0,a.createElement)(_.Link,{href:(0,y.getAdminLink)("admin.php?page=wc-admin&path=%2Fcustomers&search="+e.reviewer),onClick:()=>this.recordReviewEvent("customer"),type:"external"}),verifiedCustomerIcon:e.verified?(0,a.createElement)("span",{className:"woocommerce-review-activity-card__verified"},(0,a.createElement)(h.Tooltip,{text:(0,u.__)("Verified owner","woocommerce")},(0,a.createElement)("span",null,(0,a.createElement)(U,null)))):null}}),n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.ReviewRating,{review:e,icon:x.Z,outlineIcon:P.Z,size:13})),c=(0,E.get)(t,["images",0])||(0,E.get)(t,["image"]),r=i()("woocommerce-review-activity-card__image-overlay__product",{"is-placeholder":!c||!c.src}),l=(0,a.createElement)("div",{className:"woocommerce-review-activity-card__image-overlay"},(0,a.createElement)("div",{className:r},(0,a.createElement)(_.ProductImage,{product:t,width:33,height:33}))),s={date:e.date_created_gmt,status:e.status},m=[(0,a.createElement)(h.Button,{key:"approve-action",isSecondary:!0,onClick:()=>{this.recordReviewEvent("approve",s),this.updateReviewStatus(e.id,"approved",e.status)}},(0,u.__)("Approve","woocommerce")),(0,a.createElement)(h.Button,{key:"spam-action",isTertiary:!0,onClick:()=>{this.recordReviewEvent("mark_as_spam",s),this.updateReviewStatus(e.id,"spam",e.status)}},(0,u.__)("Mark as spam","woocommerce")),(0,a.createElement)(h.Button,{key:"delete-action",isDestructive:!0,isTertiary:!0,onClick:()=>{this.recordReviewEvent("delete",s),this.deleteReview(e.id)}},(0,u.__)("Delete","woocommerce"))];return(0,a.createElement)(f.U,{className:"woocommerce-review-activity-card",key:e.id,title:o,subtitle:n,date:e.date_created_gmt,icon:l,actions:m},(0,a.createElement)("span",{dangerouslySetInnerHTML:(0,D.ZP)(e.review)}))}renderReviews(e){const t=e.map((e=>this.renderReview(e,this.props)));return 0===t.filter(Boolean).length?(0,a.createElement)(a.Fragment,null):(0,a.createElement)(a.Fragment,null,t,(0,a.createElement)(_.Link,{href:(0,y.getAdminLink)("edit.php?post_type=product&page=product-reviews"),onClick:()=>this.recordReviewEvent("reviews_manage"),className:"woocommerce-layout__activity-panel-outbound-link woocommerce-layout__activity-panel-empty",type:"wp-admin"},(0,u.__)("Manage all reviews","woocommerce")))}render(){const{isRequesting:e,isError:t,reviews:o}=this.props;if(t){const e=(0,u.__)("There was an error getting your reviews. Please try again.","woocommerce"),t=(0,u.__)("Reload","woocommerce"),o=()=>{window.location.reload()};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:o}))}return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.Section,null,e||!o.length?(0,a.createElement)(f.e,{className:"woocommerce-review-activity-card",hasAction:!0,hasDate:!0,lines:1}):(0,a.createElement)(a.Fragment,null,this.renderReviews(o))))}}q.propTypes={reviews:d().array.isRequired,isError:d().bool,isRequesting:d().bool},q.defaultProps={reviews:[],isError:!1,isRequesting:!1},q.contextType=k.CurrencyContext;const B=(0,n.compose)([(0,c.withSelect)(((e,t)=>{const{hasUnapprovedReviews:o}=t,{getReviews:a,getReviewsError:n,isResolving:c}=e(r.REVIEWS_STORE_NAME);let l=[],s=!1,i=!1;return o&&(l=a(H),s=Boolean(n(H)),i=c("getReviews",[H])),{reviews:l,isError:s,isRequesting:i}})),(0,c.withDispatch)(((e,t)=>{const{deleteReview:o,updateReview:a,invalidateResolution:n}=e(r.REVIEWS_STORE_NAME),{createNotice:c}=e("core/notices");return{deleteReview:o,createNotice:c,updateReview:a,clearReviewsCache:()=>{n("getReviews",[H]),t.reviews&&t.reviews.length<2&&n("getReviewsTotalCount",[F.wY])}}}))])(q);var W=o(34374);const G={_fields:["id"]},V={status:"publish",_fields:["id"]},j=()=>{const e=(0,c.useSelect)((e=>{const{getOrdersTotalCount:t,hasFinishedResolution:o}=e(r.ORDERS_STORE_NAME),{getProductsTotalCount:a,hasFinishedResolution:n}=e(r.PRODUCTS_STORE_NAME),c=t(G,0),l=(0,g.sg)(e),s=(0,N.O3)("reviewsEnabled","no"),i=(0,g.xX)(e,l),m=(0,N.O3)("manageStock","no"),d=(0,g.ae)(e),u=(0,F.Vh)(e),p=a(V,0),_=!o("getOrdersTotalCount",[G,0])||!n("getProductsTotalCount",[V,0]),h=e(r.ONBOARDING_STORE_NAME).getTaskList("setup");return{loadingOrderAndProductCount:_,lowStockProductsCount:d,unapprovedReviewsCount:u,unreadOrdersCount:i,manageStock:m,isTaskListHidden:null==h?void 0:h.isHidden,publishedProductCount:p,reviewsEnabled:s,totalOrderCount:c,orderStatuses:l}})),t=e.loadingOrderAndProductCount?[]:function(e){let{lowStockProductsCount:t,unapprovedReviewsCount:o,unreadOrdersCount:n,manageStock:c,isTaskListHidden:r,orderStatuses:l,publishedProductCount:s,reviewsEnabled:i,totalOrderCount:m}=e;return r?[m>0&&{className:"woocommerce-homescreen-card",count:n,collapsible:!0,id:"orders-panel",initialOpen:!1,panel:(0,a.createElement)(T,{unreadOrdersCount:n,orderStatuses:l}),title:(0,u.__)("Orders","woocommerce")},m>0&&s>0&&"yes"===c&&{className:"woocommerce-homescreen-card",count:t,id:"stock-panel",initialOpen:!1,collapsible:0!==t,panel:(0,a.createElement)(I,{lowStockProductsCount:t}),title:(0,u.__)("Stock","woocommerce")},s>0&&o>0&&"yes"===i&&{className:"woocommerce-homescreen-card",id:"reviews-panel",count:o,initialOpen:!1,collapsible:0!==o,panel:(0,a.createElement)(B,{hasUnapprovedReviews:o>0}),title:(0,u.__)("Reviews","woocommerce")}].filter(Boolean):[]}(e);if((0,a.useEffect)((()=>{if(void 0!==e.isTaskListHidden){const o=t.reduce(((e,t)=>(e[(0,E.snakeCase)(t.id)]=!0,e)),{task_list:e.isTaskListHidden});(0,w.recordEvent)("activity_panel_visible_panels",o)}}),[e.isTaskListHidden]),0===t.length)return null;const o=e=>{const{opened_panel:t}=(0,W.DP)(window.location.search);return e===t};return(0,a.createElement)(h.Panel,{className:"woocommerce-activity-panel"},t.map((e=>{const{className:t,count:n,id:c,initialOpen:r,panel:l,title:s,collapsible:i}=e;return i?(0,a.createElement)(h.PanelBody,{title:[(0,a.createElement)(h.__experimentalText,{key:s,variant:"title.small",size:"20",lineHeight:"28px"},s),null!==n&&(0,a.createElement)(_.Badge,{key:`${s}-badge`,count:n})],key:c,className:t,initialOpen:o(c)||r,collapsible:i,disabled:!i,onToggle:e=>{e&&(0,w.recordEvent)("activity_panel_open",{tab:c})}},(0,a.createElement)(h.PanelRow,null,l)):(0,a.createElement)("div",{className:"components-panel__body",key:c},(0,a.createElement)("h2",{className:"components-panel__body-title"},(0,a.createElement)(h.Button,{className:"components-panel__body-toggle","aria-expanded":!1,disabled:!0},(0,a.createElement)(h.__experimentalText,{variant:"title.small",size:"20",lineHeight:"28px"},s),null!==n&&(0,a.createElement)(_.Badge,{count:n}))))})))},Z=e=>{let{children:t,shouldStick:o=!1}=e;const[n,c]=(0,a.useState)(!1),r=(0,a.useRef)(null),l=(0,a.useRef)(null),s=(0,a.useCallback)((()=>{if(!r.current)return;const{bottom:e,top:t}=r.current.getBoundingClientRect();null===l.current&&(l.current=t);const o=e<window.innerHeight;t===l.current&&c(o)}),[]);return(0,a.useLayoutEffect)((()=>{if(o)return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s)}}),[s,o]),(0,a.createElement)("div",{className:"woocommerce-homescreen-column",ref:r,style:{position:o&&n?"sticky":"static"}},t)};var J=o(69338),K=o(14812),Y=o(29363),Q=o(19097),$=o(58656);const X="woocommerce_task_list_welcome_modal_dismissed",ee="woocommerce_welcome_from_calypso_modal_dismissed",te="woocommerce_navigation_intro_modal_dismissed",oe=()=>{const[e,t]=(0,a.useState)(!0),{updateOptions:o}=(0,c.useDispatch)(r.OPTIONS_STORE_NAME),{isDismissed:n,isResolving:l,isWelcomeModalShown:s}=(0,c.useSelect)((e=>{const{getOption:t,isResolving:o}=e(r.OPTIONS_STORE_NAME),a=t(te);return{isDismissed:"yes"===a,isWelcomeModalShown:"yes"!==t(X),isResolving:void 0===a||o("getOption",[te])||o("getOption",[X])}})),i=()=>{o({[te]:"yes"}),(0,w.recordEvent)("navigation_intro_modal_close",{}),t(!1)};if((0,a.useEffect)((()=>{l||!s||n||i()}),[n,l,s]),!e||n||l||s)return null;const m=(e,t,o)=>({content:(0,a.createElement)("div",{className:"woocommerce-navigation-intro-modal__page-wrapper"},(0,a.createElement)("div",{className:"woocommerce-navigation-intro-modal__page-text"},(0,a.createElement)(K.Text,{variant:"title.large",as:"h2",size:"32",lineHeight:"40px"},e),(0,a.createElement)(K.Text,{as:"p",variant:"body.large",size:"16",lineHeight:"24px"},t)),(0,a.createElement)("div",{className:"woocommerce-navigation-intro-modal__image-wrapper"},(0,a.createElement)("img",{alt:e,src:o})))});return(0,a.createElement)(h.Guide,{className:"woocommerce-navigation-intro-modal",onFinish:i,pages:[m((0,u.__)("A new navigation for WooCommerce","woocommerce"),(0,u.__)("All of your store management features in one place","woocommerce"),Y),m((0,u.__)("Focus on managing your store","woocommerce"),(0,u.__)("Give your attention to key areas of WooCommerce with little distraction","woocommerce"),Q),m((0,u.__)("Easily find and favorite your extensions","woocommerce"),(0,u.__)("They'll appear in the top level of the navigation for quick access","woocommerce"),$)]})};var ae=o(92694);const ne=(0,ae.applyFilters)("woocommerce_admin_homepage_default_stats",["revenue/total_sales","revenue/net_revenue","orders/orders_count","products/items_sold","jetpack/stats/visitors","jetpack/stats/views"]),ce=["revenue/net_revenue","products/items_sold"];var re=o(54541);const le=(0,c.withSelect)(((e,t)=>{let{stats:o,query:a}=t;return(0,re.A)(e,o,a)}))((e=>{let{stats:t,primaryData:o,secondaryData:n,primaryRequesting:c,secondaryRequesting:r,primaryError:s,secondaryError:m,query:d}=e;const{formatAmount:p,getCurrencyConfig:h}=(0,a.useContext)(k.CurrencyContext);if(s||m)return null;const E=(0,l.getPersistedQuery)(d),g=h();return(0,a.createElement)("ul",{className:i()("woocommerce-stats-overview__stats",{"is-even":t.length%2==0})},t.map((e=>{if(c||r)return(0,a.createElement)(_.SummaryNumberPlaceholder,{key:e.stat});const{primaryValue:t,secondaryValue:l,delta:s,reportUrl:i,reportUrlType:m}=(0,re.Z)({indicator:e,primaryData:o,secondaryData:n,currency:g,formatAmount:p,persistedQuery:E});return(0,a.createElement)(_.SummaryNumber,{isHomescreen:!0,key:e.stat,href:i,hrefType:m,label:e.label,value:t,prevLabel:(0,u.__)("Previous period:","woocommerce"),prevValue:l,delta:s,onLinkClickCallback:()=>{(0,w.recordEvent)("statsoverview_indicators_click",{key:e.stat})}})})))}));var se=o(23418);let ie;(0,u.__)("Facebook for WooCommerce","woocommerce"),(0,u.__)("Jetpack","woocommerce"),(0,u.__)("Klarna Checkout for WooCommerce","woocommerce"),(0,u.__)("Klarna Payments for WooCommerce","woocommerce"),(0,u.__)("Mailchimp for WooCommerce","woocommerce"),(0,u.__)("Creative Mail for WooCommerce","woocommerce"),(0,u.__)("WooCommerce PayPal","woocommerce"),(0,u.__)("WooCommerce Stripe","woocommerce"),(0,u.__)("WooCommerce Payfast","woocommerce"),(0,u.__)("WooPayments","woocommerce"),(0,u.__)("WooCommerce Shipping & Tax","woocommerce"),(0,u.__)("WooCommerce Shipping & Tax","woocommerce"),(0,u.__)("WooCommerce Shipping & Tax","woocommerce"),(0,u.__)("WooCommerce ShipStation Gateway","woocommerce"),(0,u.__)("Mercado Pago payments for WooCommerce","woocommerce"),(0,u.__)("Google Listings and Ads","woocommerce"),(0,u.__)("Razorpay","woocommerce"),(0,u.__)("MailPoet","woocommerce"),(0,u.__)("Pinterest for WooCommerce","woocommerce"),(0,u.__)("TikTok for WooCommerce","woocommerce"),(0,u.__)("Omnichannel for WooCommerce","woocommerce"),function(e){e.UPDATE_ACTIVE_PLUGINS="UPDATE_ACTIVE_PLUGINS",e.UPDATE_INSTALLED_PLUGINS="UPDATE_INSTALLED_PLUGINS",e.SET_IS_REQUESTING="SET_IS_REQUESTING",e.SET_ERROR="SET_ERROR",e.UPDATE_JETPACK_CONNECTION="UPDATE_JETPACK_CONNECTION",e.UPDATE_JETPACK_CONNECT_URL="UPDATE_JETPACK_CONNECT_URL",e.UPDATE_JETPACK_CONNECTION_DATA="UPDATE_JETPACK_CONNECTION_DATA",e.SET_PAYPAL_ONBOARDING_STATUS="SET_PAYPAL_ONBOARDING_STATUS",e.SET_RECOMMENDED_PLUGINS="SET_RECOMMENDED_PLUGINS"}(ie||(ie={}));const me=c.controls&&c.controls.dispatch?c.controls.dispatch:se.dispatch;c.controls&&c.controls.resolveSelect?c.controls.resolveSelect:se.select,Error;const de=e=>me("core/notices","createNotice","error",e),ue=e=>{let{onClickInstall:t,onClickDismiss:o,isBusy:n,jetpackInstallState:c}=e;return(0,a.createElement)("article",{className:"woocommerce-stats-overview__install-jetpack-promo"},(0,a.createElement)("div",{className:"woocommerce-stats-overview__install-jetpack-promo__content"},(0,a.createElement)(_.H,null,(0,u.__)("Get traffic stats with Jetpack","woocommerce")),(0,a.createElement)("p",null,(0,u.__)("Keep an eye on your views and visitors metrics with Jetpack. Requires Jetpack plugin and a WordPress.com account.","woocommerce"))),(0,a.createElement)("footer",null,(0,a.createElement)(h.Button,{isSecondary:!0,onClick:()=>{(0,w.recordEvent)("statsoverview_install_jetpack"),t()},disabled:n,isBusy:n},(e=>({unavailable:(0,u.__)("Get Jetpack","woocommerce"),installed:(0,u.__)("Activate Jetpack","woocommerce"),activated:(0,u.__)("Connect Jetpack","woocommerce")}[e]||""))(c)),(0,a.createElement)(h.Button,{isTertiary:!0,onClick:()=>{(0,w.recordEvent)("statsoverview_dismiss_install_jetpack"),o()},disabled:n,isBusy:n},(0,u.__)("No thanks","woocommerce"))))},pe=()=>{const{currentUserCan:e}=(0,r.useUser)(),{updateUserPreferences:t,...o}=(0,r.useUserPreferences)(),{canUserInstallPlugins:n,jetpackInstallState:l,isBusy:s}=(0,c.useSelect)((t=>{const{getPluginInstallState:o,isPluginsRequesting:a}=t(r.PLUGINS_STORE_NAME),n=o("jetpack");return{isBusy:a("getJetpackConnectUrl")||a("installPlugins")||a("activatePlugins"),jetpackInstallState:n,canUserInstallPlugins:e("install_plugins")}})),{installJetpackAndConnect:i}=(0,c.useDispatch)(r.PLUGINS_STORE_NAME);return n?(0,a.createElement)(ue,{jetpackInstallState:l,isBusy:s,onClickInstall:()=>{i(de,y.getAdminLink)},onClickDismiss:()=>{const e=o.homepage_stats||{};e.installJetpackDismissed=!0,t({homepage_stats:e})}}):null},{performanceIndicators:_e=[]}=(0,N.O3)("dataEndpoints",{performanceIndicators:[]}),he=_e.filter((e=>ne.includes(e.stat))),we=()=>(0,a.createElement)(K.Text,{variant:"title.small",size:"20",lineHeight:"28px"},(0,u.__)("Stats overview","woocommerce")),Ee=()=>{const{updateUserPreferences:e,...t}=(0,r.useUserPreferences)(),o=(0,E.get)(t,["homepage_stats","hiddenStats"],ce),n=(0,c.useSelect)((e=>e(r.PLUGINS_STORE_NAME).isJetpackConnected()),[]),s=(t.homepage_stats||{}).installJetpackDismissed,i=he.filter((e=>!o.includes(e.stat)));return(0,a.createElement)(h.Card,{size:"large",className:"woocommerce-stats-overview woocommerce-homescreen-card"},(0,a.createElement)(h.CardHeader,{size:"medium"},(0,a.createElement)(we,null),(0,a.createElement)(_.EllipsisMenu,{label:(0,u.__)("Choose which values to display","woocommerce"),renderContent:()=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_.MenuTitle,null,(0,u.__)("Display stats:","woocommerce")),he.map((t=>{const n=!o.includes(t.stat);return(0,a.createElement)(_.MenuItem,{checked:n,isCheckbox:!0,isClickable:!0,key:t.stat,onInvoke:()=>(t=>{const a=(0,E.xor)(o,[t]);e({homepage_stats:{hiddenStats:a}}),(0,w.recordEvent)("statsoverview_indicators_toggle",{indicator_name:t,status:a.includes(t)?"off":"on"})})(t.stat)},t.label)})))})),(0,a.createElement)(h.TabPanel,{className:"woocommerce-stats-overview__tabs",onSelect:e=>{(0,w.recordEvent)("statsoverview_date_picker_update",{period:e})},tabs:[{title:(0,u.__)("Today","woocommerce"),name:"today"},{title:(0,u.__)("Week to date","woocommerce"),name:"week"},{title:(0,u.__)("Month to date","woocommerce"),name:"month"}]},(e=>(0,a.createElement)(a.Fragment,null,!n&&!s&&(0,a.createElement)(pe,null),(0,a.createElement)(le,{query:{period:e.name,compare:"previous_period"},stats:i})))),(0,a.createElement)(h.CardFooter,null,(0,a.createElement)(_.Link,{className:"woocommerce-stats-overview__more-btn",href:(0,l.getNewPath)({},"/analytics/overview"),type:"wc-admin",onClick:()=>{(0,w.recordEvent)("statsoverview_indicators_click",{key:"view_detailed_stats"})}},(0,u.__)("View detailed stats","woocommerce"))))};var ge=o(26184),ve=o(34200),ye=o(70444);const ke=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})),fe=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})),Ne=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),Se=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})),Ce=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"})),be=(0,a.createElement)(ye.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(ye.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})),Te=e=>{let{title:t,children:o}=e;return(0,a.createElement)("div",{className:"woocommerce-quick-links__category"},(0,a.createElement)("h3",{className:"woocommerce-quick-links__category-header"},t),o)};var Me=o(23374),Oe=o(12532);const Re=e=>{let{icon:t,title:o,href:n,linkType:c,onClick:r}=e;const l="external"===c;return(0,a.createElement)("div",{className:"woocommerce-quick-links__item"},(0,a.createElement)(_.Link,{onClick:r,href:n,type:c,target:l?"_blank":null,className:"woocommerce-quick-links__item-link"},(0,a.createElement)(Me.Z,{className:"woocommerce-quick-links__item-link__icon",icon:t}),(0,a.createElement)(K.Text,{className:"woocommerce-quick-links__item-link__text",as:"div",variant:"button",weight:"600",size:"14",lineHeight:"20px"},o),l&&(0,a.createElement)(Me.Z,{icon:Oe.Z})))};function Le(e){let{path:t,tab:o=null,type:a,href:n=null}=e;return{"wc-admin":{href:`admin.php?page=wc-admin&path=%2F${t}`,linkType:"wc-admin"},"wp-admin":{href:t,linkType:"wp-admin"},"wc-settings":{href:`admin.php?page=wc-settings&tab=${o}`,linkType:"wp-admin"}}[a]||{href:n,linkType:"external"}}const ze=()=>{const e=(0,N.O3)("shopUrl"),t=(0,ae.applyFilters)("woocommerce_admin_homescreen_quicklinks",[]).reduce(((e,t)=>{let{icon:o,href:a,title:n}=t;return new URL(a,window.location.href).origin===window.location.origin&&e.push({icon:o,link:{href:a,linkType:"wp-admin"},title:n,listItemTag:"quick-links-extension-link"}),e}),[]),o=function(e){return[{title:(0,u.__)("Marketing & Merchandising","woocommerce"),items:[{title:(0,u.__)("Marketing","woocommerce"),link:Le({type:"wc-admin",path:"marketing"}),icon:ge.Z,listItemTag:"marketing"},{title:(0,u.__)("Add products","woocommerce"),link:Le({type:"wp-admin",path:"post-new.php?post_type=product"}),icon:ve.Z,listItemTag:"add-products"},{title:(0,u.__)("Personalize my store","woocommerce"),link:Le({type:"wp-admin",path:"customize.php"}),icon:ke,listItemTag:"personalize-store"},{title:(0,u.__)("View my store","woocommerce"),link:Le({type:"external",href:e}),icon:fe,listItemTag:"view-store"}]},{title:(0,u.__)("Settings","woocommerce"),items:[{title:(0,u.__)("Store details","woocommerce"),link:Le({type:"wc-settings",tab:"general"}),icon:Ne,listItemTag:"edit-store-details"},{title:(0,u.__)("Payments","woocommerce"),link:Le({type:"wc-settings",tab:"checkout"}),icon:Se,listItemTag:"payment-settings"},{title:(0,u.__)("Tax","woocommerce"),link:Le({type:"wc-settings",tab:"tax"}),icon:Ce,listItemTag:"tax-settings"},{title:(0,u.__)("Shipping","woocommerce"),link:Le({type:"wc-settings",tab:"shipping"}),icon:be,listItemTag:"shipping-settings"}]}]}(e),n={title:(0,u.__)("Extensions","woocommerce"),items:t},c=t.length?[...o,n]:o;return(0,a.createElement)(h.Card,{size:"medium"},(0,a.createElement)(h.CardHeader,{size:"medium"},(0,a.createElement)(K.Text,{variant:"title.small",size:"20",lineHeight:"28px"},(0,u.__)("Store management","woocommerce"))),(0,a.createElement)(h.CardBody,{size:"custom",className:"woocommerce-store-management-links__card-body"},c.map((e=>(0,a.createElement)(Te,{key:e.title,title:e.title},e.items.map((e=>{let{icon:t,listItemTag:o,title:n,link:{href:c,linkType:r}}=e;return(0,a.createElement)(Re,{icon:t,key:`${n}_${o}_${c}`,title:n,linkType:r,href:c,onClick:()=>{(0,w.recordEvent)("home_quick_links_click",{task_name:o})}})})))))))};var Ae=o(159);const Ie=()=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"517",height:"160",fill:"none"},(0,a.createElement)("defs",null),(0,a.createElement)("g",{clipPath:"url(#clip0)"},(0,a.createElement)("path",{className:"fill-theme-color",d:"M0 0h517v160H0z"}),(0,a.createElement)("path",{fill:"#fff",fillOpacity:".65",d:"M125.85 217.924l-1.055-.321c-34.868-10.598-101.138-36.619-95.91-101.998 7.156-89.462 89.192-28.933 194.231-87.715 161.485-90.37 242.851-42.249 253.957 78.717 10.842 118.101-82.942 115.494-138.938 123.306-118.486 16.529-165.516 2.231-212.285-11.989z"}),(0,a.createElement)("path",{fill:"#F6F7F7",d:"M125 33h267v185H125z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M327.367 93.974a6.417 6.417 0 00-6.285 7.671 6.418 6.418 0 005.035 5.044 6.405 6.405 0 006.579-2.73 6.427 6.427 0 00-.797-8.105 6.404 6.404 0 00-4.532-1.88zm0 11.615a5.18 5.18 0 01-3.668-1.522 5.2 5.2 0 01-1.23-5.38 5.196 5.196 0 014.168-3.447 5.18 5.18 0 014.967 2.137 5.201 5.201 0 01-1.546 7.453 5.186 5.186 0 01-2.706.75l.015.009z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M329.332 103.181l.806-.811a.354.354 0 00.078-.391.365.365 0 00-.078-.116l-1.456-1.461 1.456-1.458a.363.363 0 00.105-.254.36.36 0 00-.105-.254l-.806-.81a.354.354 0 00-.254-.106.356.356 0 00-.255.106l-1.456 1.458-1.456-1.458a.35.35 0 00-.253-.105.355.355 0 00-.253.105l-.809.826a.362.362 0 00-.078.39.363.363 0 00.078.117l1.456 1.458-1.456 1.461a.369.369 0 00-.105.254.356.356 0 00.105.254l.809.81a.354.354 0 00.39.078.354.354 0 00.116-.078l1.456-1.461 1.456 1.461a.366.366 0 00.509-.015zM314.559 145.63a6.413 6.413 0 00-2.722-4.13 6.429 6.429 0 00-4.883-.957l-.192.046c-.346.08-.684.191-1.01.33a6.437 6.437 0 00-3.892 5.926 6.433 6.433 0 003.907 5.916l.183.074a6.402 6.402 0 007.999-2.997 6.423 6.423 0 00.735-3.001 6.196 6.196 0 00-.125-1.207zm-1.184 1.978a.028.028 0 010 .018v.058a5.213 5.213 0 01-.913 2.181 5.191 5.191 0 01-4.068 2.146 5.162 5.162 0 01-3.445-1.2 5.2 5.2 0 01.693-8.443 4.936 4.936 0 011.026-.464l.192-.058a5.176 5.176 0 014.527.859 5.201 5.201 0 012.058 4.129 4.906 4.906 0 01-.07.774z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M310.223 149.613l.808-.81a.349.349 0 00.078-.116.348.348 0 000-.275.353.353 0 00-.078-.117l-1.455-1.458 1.455-1.458a.36.36 0 00.079-.393.36.36 0 00-.079-.117l-.808-.807a.362.362 0 00-.391-.078.349.349 0 00-.116.078l-1.455 1.464-1.465-1.464a.366.366 0 00-.254-.106.36.36 0 00-.253.106l-.809.807a.358.358 0 00-.078.393.358.358 0 00.078.117l1.459 1.458-1.459 1.458a.356.356 0 00-.078.392.382.382 0 00.078.116l.809.81a.365.365 0 00.253.106.366.366 0 00.254-.106l1.458-1.458 1.456 1.458a.353.353 0 00.513 0zM295.605 51.781l-.583-.587a.297.297 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372a.31.31 0 00.339.07.297.297 0 00.1-.07l4.465-4.439a.316.316 0 00.097-.22.313.313 0 00-.094-.223zm0 0l-.583-.587a.297.297 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372a.31.31 0 00.339.07.297.297 0 00.1-.07l4.465-4.439a.316.316 0 00.097-.22.313.313 0 00-.094-.223zm0 0l-.583-.587a.297.297 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372a.31.31 0 00.339.07.297.297 0 00.1-.07l4.465-4.439a.316.316 0 00.097-.22.313.313 0 00-.094-.223zm0 0l-.583-.587a.297.297 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372a.31.31 0 00.339.07.297.297 0 00.1-.07l4.465-4.439a.316.316 0 00.097-.22.313.313 0 00-.094-.223zm-3.628-4.619a6.402 6.402 0 00-5.921 3.963 6.432 6.432 0 001.389 6.996 6.404 6.404 0 009.86-.973 6.428 6.428 0 00-.797-8.106 6.403 6.403 0 00-4.531-1.88zm0 11.616a5.186 5.186 0 01-4.793-3.208 5.2 5.2 0 011.124-5.663 5.186 5.186 0 015.654-1.126 5.204 5.204 0 011.685 8.476 5.17 5.17 0 01-3.67 1.515v.006zm3.628-6.99l-.583-.588a.298.298 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372c.029.03.063.053.1.07a.31.31 0 00.239 0 .297.297 0 00.1-.07l4.465-4.438a.304.304 0 00.075-.347.31.31 0 00-.072-.103v.006zm0 0l-.583-.588a.298.298 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372c.029.03.063.053.1.07a.31.31 0 00.239 0 .297.297 0 00.1-.07l4.465-4.438a.304.304 0 00.075-.347.31.31 0 00-.072-.103v.006zm0 0l-.583-.588a.298.298 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372c.029.03.063.053.1.07a.31.31 0 00.239 0 .297.297 0 00.1-.07l4.465-4.438a.304.304 0 00.075-.347.31.31 0 00-.072-.103v.006zm0 0l-.583-.588a.298.298 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372c.029.03.063.053.1.07a.31.31 0 00.239 0 .297.297 0 00.1-.07l4.465-4.438a.304.304 0 00.075-.347.31.31 0 00-.072-.103v.006zm0 0l-.583-.588a.298.298 0 00-.219-.093.31.31 0 00-.22.093l-3.662 3.635-1.547-1.562a.308.308 0 00-.437 0l-.589.584a.313.313 0 00-.093.22.307.307 0 00.093.22l2.35 2.372c.029.03.063.053.1.07a.31.31 0 00.239 0 .297.297 0 00.1-.07l4.465-4.438a.304.304 0 00.075-.347.31.31 0 00-.072-.103v.006zM306.96 98.595l-.582-.59a.311.311 0 00-.22-.093.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.303.303 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.312.312 0 00.097-.22.308.308 0 00-.091-.22zm0 0l-.582-.59a.311.311 0 00-.22-.093.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.303.303 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.312.312 0 00.097-.22.308.308 0 00-.091-.22zm0 0l-.582-.59a.311.311 0 00-.22-.093.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.303.303 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.312.312 0 00.097-.22.308.308 0 00-.091-.22zm0 0l-.582-.59a.311.311 0 00-.22-.093.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.303.303 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.312.312 0 00.097-.22.308.308 0 00-.091-.22zm-3.628-4.621a6.417 6.417 0 00-6.285 7.671 6.412 6.412 0 005.035 5.044 6.401 6.401 0 006.578-2.73 6.42 6.42 0 00-.797-8.105 6.4 6.4 0 00-4.531-1.88zm0 11.615a5.18 5.18 0 01-4.793-3.208 5.201 5.201 0 013.781-7.085 5.179 5.179 0 015.326 2.21c.57.854.874 1.86.874 2.887a5.202 5.202 0 01-1.516 3.677 5.178 5.178 0 01-3.672 1.516v.003zm3.628-6.99l-.582-.59a.31.31 0 00-.22-.094.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.302.302 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.3.3 0 00.098-.22.304.304 0 00-.092-.223v.002zm0 0l-.582-.59a.31.31 0 00-.22-.094.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.302.302 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.3.3 0 00.098-.22.304.304 0 00-.092-.223v.002zm0 0l-.582-.59a.31.31 0 00-.22-.094.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.302.302 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.3.3 0 00.098-.22.304.304 0 00-.092-.223v.002zm0 0l-.582-.59a.31.31 0 00-.22-.094.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.302.302 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.3.3 0 00.098-.22.304.304 0 00-.092-.223v.002zm0 0l-.582-.59a.31.31 0 00-.22-.094.308.308 0 00-.22.093l-3.662 3.635-1.547-1.562a.31.31 0 00-.22-.094.302.302 0 00-.22.094l-.589.584a.31.31 0 000 .44l2.347 2.372c.029.03.063.053.101.069a.302.302 0 00.339-.069l4.467-4.438a.3.3 0 00.098-.22.304.304 0 00-.092-.223v.002zM287.774 145.407l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.309.309 0 00.097-.219.309.309 0 00-.091-.221zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.309.309 0 00.097-.219.309.309 0 00-.091-.221zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.309.309 0 00.097-.219.309.309 0 00-.091-.221zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.309.309 0 00.097-.219.309.309 0 00-.091-.221zm-3.628-4.622a6.416 6.416 0 00-6.285 7.671 6.414 6.414 0 005.035 5.044 6.393 6.393 0 003.702-.365 6.418 6.418 0 003.957-5.931 6.43 6.43 0 00-1.877-4.539 6.403 6.403 0 00-4.532-1.88zm0 11.616a5.181 5.181 0 01-2.882-.876 5.2 5.2 0 011.87-9.418 5.186 5.186 0 015.326 2.21c.57.855.874 1.859.874 2.887a5.191 5.191 0 01-1.515 3.678 5.163 5.163 0 01-3.673 1.516v.003zm3.628-6.991l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.297.297 0 00.098-.22.293.293 0 00-.023-.121.284.284 0 00-.069-.102v.003zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.297.297 0 00.098-.22.293.293 0 00-.023-.121.284.284 0 00-.069-.102v.003zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.297.297 0 00.098-.22.293.293 0 00-.023-.121.284.284 0 00-.069-.102v.003zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.297.297 0 00.098-.22.293.293 0 00-.023-.121.284.284 0 00-.069-.102v.003zm0 0l-.582-.59a.303.303 0 00-.101-.069.302.302 0 00-.339.069l-3.662 3.634-1.547-1.562a.31.31 0 00-.439 0l-.589.584a.301.301 0 00-.07.34c.017.038.04.072.07.1l2.346 2.372a.301.301 0 00.339.07.321.321 0 00.101-.07l4.467-4.438a.297.297 0 00.098-.22.293.293 0 00-.023-.121.284.284 0 00-.069-.102v.003zM349.568 75.187l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm-3.628-4.619a6.402 6.402 0 00-4.17 1.5 6.422 6.422 0 00-1.386 8.21 6.415 6.415 0 003.447 2.79 6.4 6.4 0 004.477-.092c.317-.126.624-.278.915-.456a6.418 6.418 0 002.93-7.236 6.422 6.422 0 00-2.309-3.413 6.4 6.4 0 00-3.904-1.303zm2.273 11.087a5.056 5.056 0 01-.665.272 5.213 5.213 0 01-3.406-.067 5.197 5.197 0 01-1.681-8.731 5.182 5.182 0 018.501 2.56 5.195 5.195 0 01-2.749 5.966zm1.355-6.468l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447zm0 0l-.583-.578a.298.298 0 00-.219-.093.306.306 0 00-.22.093l-1.904 1.895-.687.682-.058.055-.357.358-.638.632-1.547-1.562a.308.308 0 00-.44 0l-.589.584a.312.312 0 00-.093.22.307.307 0 00.093.22l2.216 2.241.131.132a.304.304 0 00.44.003l1.849-1.835.61-.61 2.002-1.99a.306.306 0 00-.006-.447z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M268.92 47H150.08c-3.358 0-6.08 2.91-6.08 6.5s2.722 6.5 6.08 6.5h118.84c3.358 0 6.08-2.91 6.08-6.5s-2.722-6.5-6.08-6.5z",opacity:".6"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M321.919 71H150.081c-3.359 0-6.081 2.686-6.081 6s2.722 6 6.081 6h171.838c3.359 0 6.081-2.686 6.081-6s-2.722-6-6.081-6z",opacity:".3"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M279.927 94H150.073c-3.354 0-6.073 2.91-6.073 6.5s2.719 6.5 6.073 6.5h129.854c3.354 0 6.073-2.91 6.073-6.5s-2.719-6.5-6.073-6.5z",opacity:".6"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M321.919 118H150.081c-3.359 0-6.081 2.686-6.081 6s2.722 6 6.081 6h171.838c3.359 0 6.081-2.686 6.081-6s-2.722-6-6.081-6z",opacity:".3"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M261.916 141H150.084c-3.36 0-6.084 2.686-6.084 6s2.724 6 6.084 6h111.832c3.36 0 6.084-2.686 6.084-6s-2.724-6-6.084-6z",opacity:".1"}),(0,a.createElement)("path",{fill:"#CCC",d:"M316.161 47.162a6.4 6.4 0 00-5.92 3.963 6.432 6.432 0 001.389 6.996 6.404 6.404 0 009.86-.973 6.428 6.428 0 00-.797-8.106 6.404 6.404 0 00-4.532-1.88zm0 11.616a5.18 5.18 0 01-2.882-.876 5.198 5.198 0 011.87-9.417 5.181 5.181 0 015.326 2.21c.57.854.874 1.859.874 2.887a5.195 5.195 0 01-3.201 4.8c-.63.26-1.305.392-1.987.39v.006z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M318.127 56.366l.808-.807a.35.35 0 00.078-.117.346.346 0 000-.276.35.35 0 00-.078-.117l-1.458-1.458 1.455-1.458a.35.35 0 00.078-.117.346.346 0 000-.277.35.35 0 00-.078-.117l-.808-.807a.364.364 0 00-.254-.105.358.358 0 00-.253.105l-1.456 1.458-1.455-1.458a.361.361 0 00-.51 0l-.806.807a.365.365 0 00-.107.255.365.365 0 00.107.256l1.456 1.458-1.453 1.455a.365.365 0 00-.079.394.381.381 0 00.079.116l.806.807a.353.353 0 00.255.106.363.363 0 00.255-.106l1.455-1.458 1.456 1.458a.352.352 0 00.253.107.356.356 0 00.254-.104zM369.966 70.568a6.402 6.402 0 00-5.921 3.963 6.432 6.432 0 001.389 6.995 6.404 6.404 0 0010.94-4.539 6.403 6.403 0 00-3.953-5.935 6.383 6.383 0 00-2.455-.484zm0 11.616a5.179 5.179 0 01-3.17-1.076 5.203 5.203 0 01-1.621-6.136 5.187 5.187 0 015.512-3.13 5.186 5.186 0 012.985 1.519 5.2 5.2 0 01-1.158 8.146 5.18 5.18 0 01-2.548.674v.003z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M371.925 79.772l.808-.807a.363.363 0 000-.51l-1.458-1.459 1.458-1.458a.348.348 0 00.078-.116.343.343 0 000-.275.346.346 0 00-.078-.116l-.808-.81a.358.358 0 00-.507 0l-1.452 1.458-1.456-1.458a.358.358 0 00-.507 0l-.808.81a.36.36 0 00-.078.391.348.348 0 00.078.116l1.455 1.458-1.455 1.458a.364.364 0 000 .51l.808.808a.35.35 0 00.507 0l1.456-1.458 1.458 1.458a.358.358 0 00.501 0z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M344 94h90v80h-90z"}),(0,a.createElement)("path",{fill:"#fff",fillOpacity:".65",d:"M364.607 150.419H357v25.307h7.607v-25.307zM379.317 132h-7.607v43.455h7.607V132zM394.026 136h-7.607v61.603h7.607V136zM408.736 123h-7.607v55.726h7.607V123zM423.445 132.197h-7.607v38.342h7.607v-38.342z",opacity:".2"}),(0,a.createElement)("path",{fill:"#fff",d:"M356.331 134l-.331-.495 15.486-21.052 13.65 14.005 11.039-17.456 4.84 5.868 13.168-11.268 14.625 14.021L451.763 99l.237.594-23.213 18.833-14.619-14.015-13.201 11.297-4.748-5.756-11.014 17.418-13.677-14.031L356.331 134z"})),(0,a.createElement)("defs",null,(0,a.createElement)("clipPath",{id:"clip0"},(0,a.createElement)("path",{fill:"#fff",d:"M0 0h517v160H0z"})))),Pe=e=>{let{title:t,body:o}=e;return(0,a.createElement)("div",{className:"woocommerce__welcome-modal__page-content"},(0,a.createElement)("h2",{className:"woocommerce__welcome-modal__page-content__header"},t),(0,a.createElement)("p",{className:"woocommerce__welcome-modal__page-content__body"},o))},xe={image:(0,a.createElement)(Ie,null),content:(0,a.createElement)(Pe,{title:(0,u.__)("Welcome to your new store management experience","woocommerce"),body:(0,v.Z)({mixedString:(0,u.__)("We've designed your navigation and home screen to help you focus on the things that matter most in managing your online store. {{link}}Learn more{{/link}} about these changes – or explore on your own.","woocommerce"),components:{link:(0,a.createElement)(_.Link,{href:"https://wordpress.com/support/new-woocommerce-experience-on-wordpress-dot-com/",type:"external",target:"_blank"})}})})};function Ue(e){let{onClose:t}=e;const[o,n]=(0,a.useState)(!0);if((0,a.useEffect)((()=>{(0,w.recordEvent)("welcome_from_calypso_modal_open")}),[]),!o)return null;const c=i()("woocommerce__welcome-modal","woocommerce__welcome-from-calypso-modal");return(0,a.createElement)(h.Guide,{onFinish:()=>{t&&t(),n(!1),(0,w.recordEvent)("welcome_from_calypso_modal_close")},className:c,finishButtonText:(0,u.__)("Let's go","woocommerce"),pages:[xe]})}const De=[{image:(0,a.createElement)(Ie,null),content:(0,a.createElement)(Pe,{title:(0,u.__)("Welcome to your WooCommerce store’s online HQ!","woocommerce"),body:(0,u.__)("Here's where you’ll find setup suggestions, tips and tools, and key data on your store’s performance and earnings — all the basics for store management and growth.","woocommerce")})},{image:(0,a.createElement)((()=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"517",height:"160",fill:"none"},(0,a.createElement)("defs",null),(0,a.createElement)("g",{clipPath:"url(#clip0)"},(0,a.createElement)("path",{className:"fill-theme-color",d:"M0 0h517v160H0z"}),(0,a.createElement)("path",{fill:"#fff",fillOpacity:".65",d:"M33.576 185.926c-6.271-.911-14.742-.279-17.182 7.085-1.239 3.736-.178 7.645.98 11.08 4.89 14.682 11.49 28.444 19.643 40.954 3.897 5.965 8.253 11.884 9.592 19.504 1.34 7.619-.56 16.084-2.934 23.945-5.595 18.62-13.762 36.371-24.188 52.572 16.006 9.711 34.165 19.634 52.684 12.57 11.09-4.232 21.041-14.268 32.365-15.961 7.562-1.132 14.735 1.648 21.594 4.467a998.376 998.376 0 0195.343 45.227c13.023 7.042 26.207 14.481 40.901 16.153 14.694 1.672 31.486-3.518 41.947-17.66 1.611-2.179 3.241-4.669 5.483-5.546 2.02-.776 4.069-.045 5.952.688l113.896 44.033c6.241 2.411 12.718 4.853 19.534 3.832 6.606-.985 12.833-5.095 18.858-9.148 13.771-9.237 29.242-21.105 32.239-39.005 2.407-14.347-4.339-27.253-11.974-37.283-7.636-10.03-16.705-19.204-20.353-32.315-5.549-19.955 2.798-42.949 9.281-64.164a405.4 405.4 0 0013.244-58.574c2.588-17.377 4.004-35.179.91-51.659-3.095-16.481-11.265-31.624-24.089-38.27-16.746-8.681-38.828-2.057-54.255-13.347-13.04-9.513-17.58-29.035-25.856-44.316-14.698-27.146-41.453-40.923-67.958-50.405-28.1-10.066-58.213-16.679-88.607-10-6.962 1.527-14.047 3.833-20.152 8.649-9.36 7.388-15.196 19.616-22.986 29.33C156.104 57.468 100.341 49.156 68.22 87.48c-11.398 13.594-17.581 31.878-18.797 49.831-1.31 19.318 8.69 33.652 8.706 50.888-7.135 2.277-17.21-1.211-24.553-2.273z"}),(0,a.createElement)("path",{fill:"#F6F7F7",d:"M113 33h267v185H113z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M248.466 73.79h-114.69V47.88h114.69V73.79zm-114.015-.673h113.341V48.554H134.451v24.563z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M155.702 56.63h-12.818v12.786h12.818V56.63z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M154.016 67.733h-13.493V54.274h13.493v13.46zm-12.819-.673h12.144V54.947h-12.144V67.06z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M225.267 56.966h-50v.673h50v-.673z",opacity:".7"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M235.311 61.677h-60.044v.673h60.044v-.673z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M225.267 66.387h-50v.673h50v-.673z",opacity:".2"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M248.466 147.142h-114.69v-25.909h114.69v25.909zm-114.015-.673h113.341v-24.563H134.451v24.563z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M155.702 129.981h-12.818v12.786h12.818v-12.786z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M154.016 141.085h-13.493v-13.459h13.493v13.459zm-12.819-.673h12.144v-12.113h-12.144v12.113z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M235.311 130.318h-60.044v.673h60.044v-.673z",opacity:".7"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M225.267 135.028h-50v.673h50v-.673z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M215.267 139.739h-40v.673h40v-.673z",opacity:".2"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M289.62 110.465H174.93V84.557h114.69v25.908zm-114.016-.672h113.341V85.23H175.604v24.563z"}),(0,a.createElement)("path",{fill:"#CCC",d:"M267.694 106.092h12.818V93.305h-12.818v12.787z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M282.873 104.409H269.38V90.95h13.493v13.459zm-12.818-.673h12.144V91.623h-12.144v12.113z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M248.129 93.642h-60.044v.673h60.044v-.673z",opacity:".7"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M238.085 98.353h-50v.672h50v-.672z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M243.085 103.063h-55v.673h55v-.673z",opacity:".2"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M266.035 66.154a5.363 5.363 0 005.369-5.356 5.363 5.363 0 00-5.369-5.356c-2.966 0-5.37 2.398-5.37 5.356 0 2.958 2.404 5.356 5.37 5.356zM273.793 140.515c2.966 0 5.37-2.398 5.37-5.356 0-2.958-2.404-5.356-5.37-5.356a5.363 5.363 0 00-5.369 5.356 5.363 5.363 0 005.369 5.356zM153.706 102.83a5.363 5.363 0 005.37-5.356c0-2.959-2.404-5.357-5.37-5.357s-5.37 2.398-5.37 5.357a5.363 5.363 0 005.37 5.356z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M401.276 172h-70.552a8.79 8.79 0 01-6.169-2.517 8.532 8.532 0 01-2.555-6.078V131.56a3.368 3.368 0 011.078-2.471l37.386-34.915A8.113 8.113 0 01366 92c2.06 0 4.041.778 5.536 2.174l35.645 33.289a8.882 8.882 0 012.084 2.944 8.78 8.78 0 01.735 3.515v29.483c0 2.28-.919 4.466-2.555 6.078a8.79 8.79 0 01-6.169 2.517z"}),(0,a.createElement)("path",{fill:"#F0F0F0",d:"M393.267 106h-54.534c-2.614 0-4.733 2.053-4.733 4.585v52.83c0 2.532 2.119 4.585 4.733 4.585h54.534c2.614 0 4.733-2.053 4.733-4.585v-52.83c0-2.532-2.119-4.585-4.733-4.585z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M366 150.493l-41.579-20.323a1.667 1.667 0 00-1.631.091 1.695 1.695 0 00-.579.619 1.725 1.725 0 00-.211.826v34.967a5.345 5.345 0 001.543 3.767 5.261 5.261 0 003.725 1.56h77.464a5.261 5.261 0 003.725-1.56 5.345 5.345 0 001.543-3.767v-34.368c0-.352-.088-.699-.257-1.008a2.069 2.069 0 00-1.688-1.071 2.035 2.035 0 00-1.009.205L366 150.493zM390 118h-48v2h48v-2zM390 124h-48v2h48v-2z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M384 130h-42v2h42v-2z"}),(0,a.createElement)("path",{fill:"#fff",d:"M335 112a7 7 0 100-14 7 7 0 000 14z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M336 98a8.003 8.003 0 00-7.391 4.939 7.992 7.992 0 00-.455 4.622 7.993 7.993 0 006.285 6.285A8 8 0 00344 106a8.022 8.022 0 00-8-8zm-1.642 12.265l-4.1-4.1 1.15-1.15 2.954 2.954 6.234-6.234 1.15 1.15-7.388 7.38z"})),(0,a.createElement)("defs",null,(0,a.createElement)("clipPath",{id:"clip0"},(0,a.createElement)("path",{fill:"#fff",d:"M0 0h517v160H0z"}))))),null),content:(0,a.createElement)(Pe,{title:(0,u.__)("A personalized inbox full of relevant advice","woocommerce"),body:(0,u.__)("Check your inbox for helpful growth tips tailored to your store and notifications about key traffic and sales milestones. We look forward to celebrating them with you!","woocommerce")})},{image:(0,a.createElement)((()=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"517",height:"160",fill:"none"},(0,a.createElement)("defs",null),(0,a.createElement)("g",{clipPath:"url(#clip0)"},(0,a.createElement)("path",{className:"fill-theme-color",d:"M0 0h517v160H0z"}),(0,a.createElement)("path",{fill:"#fff",fillOpacity:".65",d:"M30.501 63.74c7.21-10.372 19.533-17.051 31.735-22.399l2.057-.888c12.774-5.469 25.944-10.008 39.27-14.127 7.129-2.21 14.285-4.313 21.448-6.389l5.615-1.62c7.29-2.106 14.596-4.21 21.916-6.315a6165.97 6165.97 0 0121.511-6.139 3346.684 3346.684 0 0127.597-7.677 2189.847 2189.847 0 0121.603-5.782c9.237-2.42 18.491-4.764 27.761-7.035 7.246-1.77 14.502-3.483 21.767-5.14a1152.381 1152.381 0 0128.025-6 940.985 940.985 0 0119.106-3.654l2.908-.52c27.416-4.852 55.724-8.222 82.193-2.775l.715.151c.355.074.71.148 1.067.23a87.181 87.181 0 0114.309 4.404c8.282 3.398 15.644 8.247 20.596 14.967 7.763 10.54 8.624 24.398 6.126 37.281-2.498 12.884-8.007 25.346-12.299 37.974-1.257 3.7-2.378 7.49-3.34 11.33-5.997 24.068-5.398 49.993 11.766 67.323a93.715 93.715 0 007.029 6.227c3.928 3.218 7.905 6.424 11.03 10.3 7.28 9.017 9.211 20.756 10.296 32.099 1.425 15.086 1.236 31.775-9.516 44.175-11.153 12.875-30.519 17.317-48.211 18.232-27.498 1.457-54.442-3.316-81.339-6.956-26.898-3.641-54.739-6.141-81.787-.263a121.18 121.18 0 00-17.082 5.062 108.9 108.9 0 00-21.21 10.677c-9.622 6.318-17.826 14.22-23.006 23.613-11.123 20.092-39.488 28.645-62.664 24.15-22.115-4.288-39.921-20.774-44.019-40.738-4.538-22.229 6.615-44.308 16.332-66.515a358.83 358.83 0 003.437-8.081 238.988 238.988 0 001.795-4.513 165.185 165.185 0 002.828-7.947c4.39-13.591 6.016-28.984-2.295-40.321-4.658-6.347-11.477-10.355-19.238-13.393-17.388-6.801-39.481-8.722-52.38-21.167C22.84 94.854 21.359 76.92 30.502 63.74z"}),(0,a.createElement)("path",{fill:"#F6F7F7",d:"M124 33h267v185H124z"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M169 152.005V229a734.947 734.947 0 01-15.628-.991l-2.372-.181v-75.823c0-.395.072-.785.212-1.15.14-.365.345-.696.604-.975.258-.279.565-.5.903-.651a2.61 2.61 0 011.066-.229h12.43c.366 0 .728.078 1.066.229.338.151.645.372.903.651.259.279.464.61.604.975.14.365.212.755.212 1.15z",opacity:".7"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M186 229.733V127.377c0-.63.31-1.235.861-1.681.551-.446 1.299-.696 2.079-.696h13.12c.386 0 .768.061 1.125.181.357.119.681.294.954.515.273.221.489.483.637.771.148.289.224.598.224.91V230l-19-.267z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M225 230.002v-97.406a2.843 2.843 0 012.843-2.845h12.689a2.844 2.844 0 012.844 2.845v97.196l-18.376.21z",opacity:".7"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M282 88.368v140.224c-6 .145-12 .281-18 .408V88.368c0-.628.293-1.23.816-1.674.522-.445 1.231-.694 1.969-.694h12.43c.738 0 1.447.25 1.969.694.523.444.816 1.046.816 1.674z",opacity:".5"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M319 112.954v115.709c-6 .12-12 .232-18 .337V112.954c0-.518.293-1.015.816-1.382.522-.366 1.231-.572 1.969-.572h12.43c.738 0 1.447.206 1.969.572.523.367.816.864.816 1.382z",opacity:".7"}),(0,a.createElement)("path",{stroke:"#CCC",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M160.125 133.501l41.91-46.767 41.91 23.545 41.91-72.248 41.909 34.511"}),(0,a.createElement)("path",{className:"fill-theme-color",d:"M160 139.005c2.761 0 5-2.24 5-5.003a5.002 5.002 0 00-5-5.002c-2.761 0-5 2.24-5 5.002a5.002 5.002 0 005 5.003zM201.5 93.007c4.142 0 7.5-3.36 7.5-7.504A7.502 7.502 0 00201.5 78c-4.142 0-7.5 3.36-7.5 7.504a7.502 7.502 0 007.5 7.503zM243.784 119.31c4.985 0 9.026-4.043 9.026-9.031s-4.041-9.031-9.026-9.031c-4.986 0-9.027 4.043-9.027 9.031s4.041 9.031 9.027 9.031zM286.027 46.062c4.985 0 9.027-4.043 9.027-9.031S291.012 28 286.027 28c-4.986 0-9.027 4.043-9.027 9.031s4.041 9.031 9.027 9.031zM327.5 80.007c4.142 0 7.5-3.36 7.5-7.504A7.502 7.502 0 00327.5 65c-4.142 0-7.5 3.36-7.5 7.504a7.502 7.502 0 007.5 7.503zM408 137l-36 2-18-30.926c5.588-3.326 12.033-5.083 18.606-5.074C392.154 103 408 118.222 408 137zM351.107 110l-.143.088c-7.887 4.836-13.573 12.518-15.859 21.429a35.211 35.211 0 003.603 26.338l.084.145L370 140.317 351.107 110zm-12.19 47.543a34.886 34.886 0 01-3.485-25.944c2.25-8.77 7.826-16.342 15.566-21.138l18.531 29.738-30.612 17.344zM408.664 138.651l-35.891 2.797 10.3 32.297.162-.046c7.808-2.265 14.585-6.957 19.211-13.301 4.626-6.344 6.824-13.96 6.23-21.588l-.012-.159zm-35.447 3.081l35.134-2.738c1.116 15.348-9.387 29.753-25.051 34.355l-10.083-31.617zM370.719 142.639l-30.714 17.335.088.131c3.977 5.942 9.926 10.554 16.982 13.165 7.056 2.61 14.849 3.083 22.245 1.349l.164-.038-8.765-31.942zm-30.249 17.435l30.034-16.951 8.57 31.234c-7.278 1.673-14.935 1.192-21.871-1.374-6.936-2.566-12.794-7.086-16.733-12.909z"}),(0,a.createElement)("path",{fill:"#fff",d:"M423 97h-17v-1h17v1zM423 101h-17v-3h17v3zM416 104h-17.979l-.05.068L384 122.821l.28.179 13.92-18.685H416V104z"})),(0,a.createElement)("defs",null,(0,a.createElement)("clipPath",{id:"clip0"},(0,a.createElement)("path",{fill:"#fff",d:"M0 0h517v160H0z"}))))),null),content:(0,a.createElement)(Pe,{title:(0,u.__)("Good data leads to smart business decisions","woocommerce"),body:(0,u.__)("Monitor your stats to improve performance, increase sales, and track your progress toward revenue goals. The more you know, the better you can serve your customers and grow your store.","woocommerce")})}],Fe=e=>{let{onClose:t}=e;const[o,n]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{(0,w.recordEvent)("task_list_welcome_modal_open")}),[]),(0,a.createElement)(a.Fragment,null,o&&(0,a.createElement)(h.Guide,{onFinish:()=>{n(!1),t(),(0,w.recordEvent)("task_list_welcome_modal_close")},className:"woocommerce__welcome-modal",finishButtonText:(0,u.__)("Let's go","woocommerce"),pages:De}))};var He=o(67027),qe=o(98817),Be=o(13903);const We=e=>{let{body:t}=e;return(0,a.createElement)("div",{className:"mobile-app-modal-layout"},(0,a.createElement)("div",{className:"mobile-app-modal-content"},t),(0,a.createElement)("div",{className:"mobile-app-modal-illustration"},(0,a.createElement)("img",{src:Be,alt:(0,u.__)("Screen captures of the WooCommerce mobile app","woocommerce")})))},Ge=e=>{var t,o;let{step:n,sendMagicLinkHandler:c,sendMagicLinkStatus:r}=e;const{installHandler:l,jetpackConnectionData:s,state:i}=je(),[m,d]=(0,a.useState)(!1),[p,E]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{const e=i===Ve.INSTALLING||m;if("first"===n)E([{key:"first",label:(0,u.__)("Connect to Jetpack","woocommerce"),description:(0,u.__)("To get started, install Jetpack - our free tool required to sync your store with the WooCommerce mobile app","woocommerce"),content:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(h.Button,{className:"install-jetpack-button",onClick:()=>{d(!0),(0,w.recordEvent)("magic_prompt_install_connect_click"),l()}},e&&(0,a.createElement)(_.Spinner,{className:"install-jetpack-spinner"}),(0,a.createElement)("div",{style:{visibility:e?"hidden":"visible"},className:"install-jetpack-button-contents"},(0,a.createElement)("div",{className:"jetpack-icon"}),(0,a.createElement)("div",{className:"install-jetpack-button-text"},(0,u.__)("Install and Connect","woocommerce")))))},{key:"second",label:(0,u.__)("Sign into the app","woocommerce"),description:"",content:(0,a.createElement)(a.Fragment,null)}]);else if("second"===n){var t,o;const e=null==s||null===(t=s.currentUser)||void 0===t||null===(o=t.wpcomUser)||void 0===o?void 0:o.email;E([{key:"first",label:(0,u.sprintf)((0,u.__)("Connected as %s","woocommerce"),e),description:"",content:(0,a.createElement)(a.Fragment,null)},{key:"second",label:"Sign into the app",description:(0,u.sprintf)((0,u.__)("We’ll send a magic link to %s. Open it on your smartphone or tablet to sign into your store instantly.","woocommerce"),e),content:(0,a.createElement)(Ye,{isFetching:r===Ke.FETCHING,onClickHandler:c})}])}}),[n,l,i,m,null==s||null===(t=s.currentUser)||void 0===t||null===(o=t.wpcomUser)||void 0===o?void 0:o.email,c,r]),(0,a.createElement)("div",{className:"jetpack-stepper-wrapper"},p&&(0,a.createElement)(_.Stepper,{isVertical:!0,currentStep:n,steps:p}))},Ve={NOT_INSTALLED:"not-installed",INSTALLING:"installing",USER_CANNOT_INSTALL:"user-cannot-install",NOT_ACTIVATED:"not-activated",USERLESS_CONNECTION:"userless-connection",NOT_OWNER_OF_CONNECTION:"not-owner-of-connection",FULL_CONNECTION:"full-connection",INITIALIZING:"initializing"},je=()=>{const{currentUserCan:e}=(0,r.useUser)(),{canUserInstallPlugins:t,jetpackInstallState:o,jetpackConnectionData:n}=(0,c.useSelect)((t=>{const{getPluginInstallState:o,getJetpackConnectionData:a}=t(r.PLUGINS_STORE_NAME),n=o("jetpack");return{jetpackConnectionData:a(),jetpackInstallState:n,canUserInstallPlugins:e("install_plugins")}})),{installJetpackAndConnect:l}=(0,c.useDispatch)(r.PLUGINS_STORE_NAME),[s,i]=(0,a.useState)(Ve.INITIALIZING),m=(0,a.useCallback)((()=>{const e=window.location.href;l(de,(()=>e+"&jetpackState=returning")),i(Ve.INSTALLING)}),[l]);return(0,a.useEffect)((()=>{var e,a,c;if(t)switch(o){case"installed":i(Ve.NOT_ACTIVATED);break;case"unavailable":i(Ve.NOT_INSTALLED);break;case"activated":!n||null!=n&&n.connectionOwner?!n||null!=n&&null!==(e=n.currentUser)&&void 0!==e&&e.isMaster?n&&null!=n&&null!==(a=n.currentUser)&&void 0!==a&&a.isConnected&&null!=n&&null!==(c=n.currentUser)&&void 0!==c&&c.isMaster&&i(Ve.FULL_CONNECTION):i(Ve.NOT_OWNER_OF_CONNECTION):i(Ve.USERLESS_CONNECTION)}else i(Ve.USER_CANNOT_INSTALL)}),[t,o,n]),{state:s,installHandler:m,jetpackConnectionData:n}};var Ze=o(86989),Je=o.n(Ze);const Ke={INIT:"initializing",FETCHING:"fetching",SUCCESS:"success",ERROR:"error"},Ye=e=>{let{onClickHandler:t,isFetching:o}=e;return(0,a.createElement)(h.Button,{className:"send-magic-link-button",onClick:t},o&&(0,a.createElement)(_.Spinner,{className:"send-magic-link-spinner"}),(0,a.createElement)("div",{style:{visibility:o?"hidden":"visible"},className:"send-magic-link-button-contents"},(0,a.createElement)("div",{className:"send-magic-link-button-text"},(0,u.__)("✨️ Send the sign-in link","woocommerce"))))},Qe=e=>{let{returnToSendLinkPage:t}=e;return(0,a.createElement)("div",{className:"email-sent-modal-body"},(0,a.createElement)("div",{className:"email-sent-illustration"}),(0,a.createElement)("div",{className:"email-sent-title"},(0,a.createElement)("h1",null,(0,u.__)("Check your email!","woocommerce"))),(0,a.createElement)("div",{className:"email-sent-subheader-spacer"},(0,a.createElement)("div",{className:"email-sent-subheader"},(0,u.__)("We just sent you the magic link. Open it on your mobile device and follow the instructions.","woocommerce"))),(0,a.createElement)("div",{className:"email-sent-footer"},(0,a.createElement)("div",{className:"email-sent-footer-prompt"},(0,u.__)("DIDN’T GET IT?","woocommerce")),(0,a.createElement)("div",{className:"email-sent-footer-text"},(0,v.Z)({mixedString:(0,u.__)("Check your spam/junk email folder or {{ sendAnotherLink /}}.","woocommerce"),components:{sendAnotherLink:(0,a.createElement)(h.Button,{className:"email-sent-send-another-link",onClick:()=>{t()}},(0,u.__)("send another link","woocommerce"))}}))))};o(99196);const $e=e=>{let{children:t}=e;return(0,a.createElement)("div",{className:"jetpack-installation-content"},(0,a.createElement)("div",{className:"modal-layout-header"},(0,a.createElement)("div",{className:"woo-icon"}),(0,a.createElement)("div",{className:"modal-header"},(0,a.createElement)("h1",null,(0,u.__)("Manage orders and track sales in real-time with the free mobile app","woocommerce")))),(0,a.createElement)("div",{className:"modal-layout-body"},t),(0,a.createElement)("div",{className:"modal-layout-footer"},(0,a.createElement)("div",{className:"mobile-footer-icons"},(0,a.createElement)("div",{className:"apple-icon"}),(0,a.createElement)("div",{className:"android-icon"})),(0,a.createElement)("div",{className:"mobile-footer-blurb"},(0,u.__)("The WooCommerce Mobile App is available on iOS and Android","woocommerce"))))},Xe=e=>{let{wordpressAccountEmailAddress:t,sendMagicLinkHandler:o,sendMagicLinkStatus:n,isRetryingMagicLinkSend:l}=e;const s="woocommerce_admin_dismissed_mobile_app_modal",{repeatUser:i,isLoading:m}=(0,c.useSelect)((e=>{const{hasFinishedResolution:t,getOption:o}=e(r.OPTIONS_STORE_NAME);return{isLoading:!t("getOption",[s]),repeatUser:"yes"===o(s)}}));return(0,a.useEffect)((()=>{m||l||(0,w.recordEvent)("magic_prompt_view",{jetpack_state:"full-connection",repeat_user:i})}),[i,m,l]),(0,a.createElement)($e,null,(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"modal-subheader jetpack-already-installed"},(0,a.createElement)("h3",null,(0,u.sprintf)((0,u.__)("We’ll send a magic link to %s. Open it on your smartphone or tablet to sign into your store instantly.","woocommerce"),t))),(0,a.createElement)(Ye,{isFetching:n===Ke.FETCHING,onClickHandler:o})))},et=e=>{let{isReturningFromWordpressConnection:t,sendMagicLinkHandler:o,isRetryingMagicLinkSend:n,sendMagicLinkStatus:c}=e;const{state:r}=je(),l=(0,a.useRef)(r);return(0,a.useEffect)((()=>{l.current===Ve.INITIALIZING&&r!==Ve.INITIALIZING&&(l.current=r,t?(0,w.recordEvent)("magic_prompt_return_from_wp_connection"):n||(0,w.recordEvent)("magic_prompt_view",{jetpack_state:l.current}))}),[t,r,n]),(0,a.createElement)($e,null,(0,a.createElement)("div",{className:"modal-subheader"},(0,a.createElement)("h3",null,(0,u.__)("Run your store from anywhere in two easy steps.","woocommerce"))),(0,a.createElement)(Ge,{step:t?"second":"first",sendMagicLinkHandler:o,sendMagicLinkStatus:c}))},tt=()=>((0,a.useEffect)((()=>{(0,w.recordEvent)("magic_prompt_mismatched_wpcom_user_view")}),[]),(0,a.createElement)("div",{className:"wrong-user-connected-modal-body"},(0,a.createElement)("div",{className:"wrong-user-connected-title"},(0,a.createElement)("h1",null,(0,u.__)("Oops!","woocommerce"))),(0,a.createElement)("div",{className:"wrong-user-connected-subheader-spacer"},(0,a.createElement)("div",{className:"wrong-user-connected-subheader"},(0,u.__)("It looks like this site is connected to another WordPress.com account.","woocommerce")),(0,a.createElement)("br",null),(0,a.createElement)("div",{className:"wrong-user-connected-subheader"},(0,u.__)("WooCommerce Mobile App can currently only be registered to a single WordPress.com account.","woocommerce")))));var ot=o(37015);const at=()=>{var e,t;const[o,n]=(0,a.useState)(!1),[s,i]=(0,a.useState)(!1),{state:m,jetpackConnectionData:d}=je(),{updateOptions:p}=(0,c.useDispatch)(r.OPTIONS_STORE_NAME),[_,E]=(0,a.useState)(),[g]=(0,He.lr)();(0,a.useEffect)((()=>{g.get("mobileAppModal")?n(!0):n(!1),"returning"===g.get("jetpackState")&&i(!0)}),[g]);const[v,y]=(0,a.useState)(!1),[k,f]=(0,a.useState)(!1),{requestState:N,fetchMagicLinkApiCall:S}=(()=>{const[e,t]=(0,a.useState)(Ke.INIT),{createNotice:o}=(0,c.useDispatch)("core/notices");return{requestState:e,fetchMagicLinkApiCall:(0,a.useCallback)((()=>{t(Ke.FETCHING),Je()({path:`${r.WC_ADMIN_NAMESPACE}/mobile-app/send-magic-link`}).then((e=>{"success"===e.code?t(Ke.SUCCESS):(t(Ke.ERROR),o("error",(0,u.__)("Sorry, an unknown error occurred.","woocommerce")))})).catch((e=>{t(Ke.ERROR),(0,w.recordEvent)("magic_prompt_send_magic_link_error",{error:e.message,code:e.code}),"error_sending_mobile_magic_link"===e.code?o("error",(0,u.__)("We couldn't send the link. Try again in a few seconds.","woocommerce")):"invalid_user_permission_view_admin"===e.code?o("error",(0,u.__)("Sorry, your account doesn't have sufficient permission.","woocommerce")):"jetpack_not_connected"===e.code?o("error",e.message):o("error","We couldn't send the link. Try again in a few seconds.")}))}),[o])}})(),C=(0,a.useCallback)((()=>{S(),(0,w.recordEvent)("magic_prompt_send_signin_link_click")}),[S]);return(0,a.useEffect)((()=>{N===Ke.SUCCESS&&y(!0)}),[N]),(0,a.useEffect)((()=>{var e,t;if(v)E((0,a.createElement)(Qe,{returnToSendLinkPage:()=>{y(!1),f(!0),(0,w.recordEvent)("magic_prompt_retry_send_signin_link")}}));else if(m===Ve.NOT_OWNER_OF_CONNECTION)E((0,a.createElement)(tt,null));else if(m===Ve.NOT_INSTALLED||m===Ve.NOT_ACTIVATED||m===Ve.USERLESS_CONNECTION||m===Ve.FULL_CONNECTION&&s)E((0,a.createElement)(et,{isReturningFromWordpressConnection:s,isRetryingMagicLinkSend:k,sendMagicLinkHandler:C,sendMagicLinkStatus:N}));else if(m===Ve.FULL_CONNECTION&&null!=d&&null!==(e=d.currentUser)&&void 0!==e&&null!==(t=e.wpcomUser)&&void 0!==t&&t.email&&!v){const e=null==d?void 0:d.currentUser.wpcomUser.email;E((0,a.createElement)(Xe,{wordpressAccountEmailAddress:e,isRetryingMagicLinkSend:k,sendMagicLinkStatus:N,sendMagicLinkHandler:C}))}}),[C,v,s,null==d||null===(e=d.currentUser)||void 0===e||null===(t=e.wpcomUser)||void 0===t?void 0:t.email,m,k,N]),(0,a.createElement)(a.Fragment,null,o&&(0,a.createElement)(h.Guide,{onFinish:()=>{p({woocommerce_admin_dismissed_mobile_app_modal:"yes"}),(0,l.updateQueryString)({jetpackState:void 0,mobileAppModal:void 0},void 0,Object.fromEntries(g.entries()))},className:"woocommerce__mobile-app-welcome-modal",pages:[{content:(0,a.createElement)(We,{body:_})}]}))},nt="wc/admin/mobile-app-help-entry-callback";(0,qe.registerPlugin)("woocommerce-mobile-app-modal",{render:()=>{const{state:e}=je(),t=(0,a.useCallback)((t=>e===Ve.INITIALIZING||e===Ve.USER_CANNOT_INSTALL||e===Ve.NOT_OWNER_OF_CONNECTION?t:[...t,{title:(0,u.__)("Get the WooCommerce app","woocommerce"),link:(0,y.getAdminLink)("./admin.php?page=wc-admin&mobileAppModal=true"),linkType:"wc-admin"}]),[e]);return(0,a.useEffect)((()=>{(0,ae.removeFilter)(ot.SETUP_TASK_HELP_ITEMS_FILTER,nt),(0,ae.addFilter)(ot.SETUP_TASK_HELP_ITEMS_FILTER,nt,t,10)}),[t]),null},scope:"woocommerce-admin"});const ct="woocommerce_homescreen_experimental_header_banner_item",rt=e=>{let{children:t,order:o=1}=e;return(0,a.createElement)(h.Fill,{name:ct},(e=>(0,_.createOrderedChildren)(t,o,e)))};rt.Slot=e=>{let{fillProps:t}=e;return(0,a.createElement)(h.Slot,{name:ct,fillProps:t},_.sortFillsByOrder)};const lt=e=>{var t;let{className:o}=e;const n=(0,K.useSlot)(ct);return Boolean(null==n||null===(t=n.fills)||void 0===t?void 0:t.length)?(0,a.createElement)("div",{className:i()("woocommerce-homescreen__header",o)},(0,a.createElement)(rt.Slot,null)):null},st="experimental_woocommerce_wcpay_feature",it=e=>{let{children:t,order:o=1}=e;return(0,a.createElement)(h.Fill,{name:st},(e=>(0,_.createOrderedChildren)(t,o,e)))};it.Slot=e=>{let{fillProps:t}=e;return(0,a.createElement)(h.Slot,{name:st,fillProps:t},_.sortFillsByOrder)};const mt=e=>{var t;let{className:o}=e;const n=(0,K.useSlot)(st);return Boolean(null==n||null===(t=n.fills)||void 0===t?void 0:t.length)?(0,a.createElement)("div",{className:i()("woocommerce-homescreen__header",o)},(0,a.createElement)(it.Slot,null)):null},dt=(0,a.lazy)((()=>Promise.resolve().then(o.bind(o,159)).then((e=>({default:e.TaskLists}))))),ut=e=>{var t;let{defaultHomescreenLayout:o,query:n,taskListComplete:c,hasTaskList:l,showingProgressHeader:s,isLoadingTaskLists:m,shouldShowWelcomeModal:d,shouldShowWelcomeFromCalypsoModal:_,isTaskListHidden:h,updateOptions:w}=e;const E=(0,r.useUserPreferences)(),g=c||h,v=c||h,y=g||window.wcAdminFeatures.analytics,k=!n.task,f=(0,Ae.useActiveSetupTasklist)(),N="two_columns"===(E.homepage_layout||o)&&y,S=(0,a.useRef)(!0),C=(0,a.useCallback)((()=>{S.current=window.innerWidth>=782}),[]);(0,a.useLayoutEffect)((()=>(C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)})),[C]);const b=S.current&&N,T=null!==(t=n.mobileAppModal)&&void 0!==t&&t,M=()=>(0,a.createElement)(a.Suspense,{fallback:(0,a.createElement)(Ae.TasksPlaceholder,{query:n})},f&&k&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ae.ProgressTitle,{taskListId:f})),(0,a.createElement)(dt,{query:n}));return(0,a.createElement)(a.Fragment,null,k&&(0,a.createElement)(lt,{className:i()("woocommerce-homescreen",{"woocommerce-homescreen-column":!N})}),(0,a.createElement)("div",{className:i()("woocommerce-homescreen",{"two-columns":N})},k?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Z,{shouldStick:b},!m&&!s&&(0,a.createElement)(p.Z,{className:"your-store-today",title:(0,u.__)("Your store today","woocommerce"),subtitle:(0,u.__)("To do's, tips, and insights for your business","woocommerce")}),v&&(0,a.createElement)(mt,null),(0,a.createElement)(j,null),l&&M(),(0,a.createElement)(J.Z,null)),(0,a.createElement)(Z,{shouldStick:b},window.wcAdminFeatures.analytics&&(0,a.createElement)(Ee,null),g&&(0,a.createElement)(ze,null))):M(),d&&(0,a.createElement)(Fe,{onClose:()=>{w({[X]:"yes"})}}),_&&(0,a.createElement)(Ue,{onClose:()=>{w({[ee]:"yes"})}}),T&&(0,a.createElement)(at,null),window.wcAdminFeatures.navigation&&(0,a.createElement)(oe,null)))};ut.propTypes={taskListComplete:d().bool,hasTaskList:d().bool,query:d().object.isRequired,shouldShowWelcomeModal:d().bool,shouldShowWelcomeFromCalypsoModal:d().bool,installTimestamp:d().string,installTimestampHasResolved:d().bool,updateOptions:d().func.isRequired};const pt=(0,n.compose)((0,c.withSelect)((e=>{var t,o;const{isNotesRequesting:a}=e(r.NOTES_STORE_NAME),{getOption:n,hasFinishedResolution:c}=e(r.OPTIONS_STORE_NAME),{getTaskList:l,getTaskLists:s,hasFinishedResolution:i}=e(r.ONBOARDING_STORE_NAME),m=s(),d=!i("getTaskLists"),u="no"!==n(ee),p=c("getOption",[ee]),_=!!window.location.search.match("from-calypso"),h=p&&!u&&_,w="no"!==n(X),E=c("getOption",[X])&&!w&&p&&!u;return{defaultHomescreenLayout:n("woocommerce_default_homepage_layout")||"single_column",isBatchUpdating:a("batchUpdateNotes"),shouldShowWelcomeModal:E,shouldShowWelcomeFromCalypsoModal:h,isLoadingTaskLists:d,isTaskListHidden:null===(t=l("setup"))||void 0===t?void 0:t.isHidden,hasTaskList:(0,N.O3)("visibleTaskListIds",[]).length>0,showingProgressHeader:!!m.find((e=>e.isVisible&&e.displayProgressHeader)),taskListComplete:null===(o=l("setup"))||void 0===o?void 0:o.isComplete}})),(0,c.withDispatch)((e=>({updateOptions:e(r.OPTIONS_STORE_NAME).updateOptions}))))(ut),_t=(0,N.O3)("onboarding",{}),ht=(0,n.compose)((0,r.withOnboardingHydration)({profileItems:_t.profile}),(0,c.withSelect)((e=>{const{getProfileItems:t,hasFinishedResolution:o}=e(r.ONBOARDING_STORE_NAME);return{profileItems:t(),hasFinishedResolution:o("getProfileItems",[])}})))((e=>{let{profileItems:{completed:t,skipped:o}={},hasFinishedResolution:n}=e;(0,a.useEffect)((()=>{!n||t||o||(0,l.getHistory)().push((0,l.getNewPath)({},"/setup-wizard",{}))}),[n,t,o]);const c=(0,l.useQuery)();return(0,a.createElement)(pt,{query:c})}))},69338:(e,t,o)=>{o.d(t,{Z:()=>S});var a=o(69307),n=o(65736),c=o(86020),r=o(55609),l=o(67221),s=o(9818),i=o(14599),m=o(61586),d=o(28443),u=o(14812),p=o(76292),_=o.n(p),h=o(65663),w=o(23322),E=o(34374);const g=e=>{let{onClose:t}=e;const{createNotice:o}=(0,s.useDispatch)("core/notices"),{batchUpdateNotes:c,removeAllNotes:m}=(0,s.useDispatch)(l.NOTES_STORE_NAME);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(r.Modal,{title:(0,n.__)("Dismiss all messages","woocommerce"),className:"woocommerce-inbox-dismiss-all-modal",onRequestClose:t},(0,a.createElement)("div",{className:"woocommerce-inbox-dismiss-all-modal__wrapper"},(0,a.createElement)("div",{className:"woocommerce-usage-modal__message"},(0,n.__)("Are you sure? Inbox messages will be dismissed forever.","woocommerce")),(0,a.createElement)("div",{className:"woocommerce-usage-modal__actions"},(0,a.createElement)(r.Button,{onClick:t},(0,n.__)("Cancel","woocommerce")),(0,a.createElement)(r.Button,{isPrimary:!0,onClick:()=>{(async()=>{(0,i.recordEvent)("wcadmin_inbox_action_dismissall",{});try{const e=await m({status:"unactioned"});o("success",(0,n.__)("All messages dismissed","woocommerce"),{actions:[{label:(0,n.__)("Undo","woocommerce"),onClick:()=>{c(e.map((e=>e.id)),{is_deleted:0})}}]})}catch(e){o("error",(0,n.__)("Messages could not be dismissed","woocommerce")),t()}})(),t()}},(0,n.__)("Yes, dismiss all","woocommerce"))))))},v={page:1,per_page:5,status:"unactioned",type:l.QUERY_DEFAULTS.noteTypes,orderby:"date",order:"desc",_fields:["id","name","title","content","type","status","actions","date_created","date_created_gmt","layout","image","is_deleted","is_read","locale"]},y=["en_US","en_AU","en_CA","en_GB","en_ZA"],k=_()("2022-01-11","YYYY-MM-DD").valueOf(),f=(e,t)=>{(0,i.recordEvent)("inbox_action_click",{note_name:e.name,note_title:e.title,note_content_inner_link:t})};let N=!1;const S=e=>{let{showHeader:t=!0}=e;const[o,p]=(0,a.useState)(v.per_page),[S,C]=(0,a.useState)(!1),[b,T]=(0,a.useState)([]),[M,O]=(0,a.useState)({}),{createNotice:R}=(0,s.useDispatch)("core/notices"),{removeNote:L,updateNote:z,triggerNoteAction:A,invalidateResolutionForStoreSelector:I}=(0,s.useDispatch)(l.NOTES_STORE_NAME),P=(0,E.GG)(),x=(0,a.useMemo)((()=>({...v,per_page:o})),[o]),{isError:U,notes:D,notesHaveResolved:F,isBatchUpdating:H,unreadNotesCount:q}=(0,s.useSelect)((e=>{const{getNotes:t,getNotesError:o,isNotesRequesting:a,hasFinishedResolution:n}=e(l.NOTES_STORE_NAME);return{notes:t(x),unreadNotesCount:t({...v,is_read:!1,per_page:-1}).length,isError:Boolean(o("getNotes",[x])),isBatchUpdating:a("batchUpdateNotes"),notesHaveResolved:!a("batchUpdateNotes")&&n("getNotes",[x])}}));(0,a.useEffect)((()=>{F&&D.length<o&&C(!0),F&&D.length&&T(D.map((e=>{const t=_()(e.date_created_gmt,"YYYY-MM-DD").valueOf();return y.includes(e.locale)&&t>=k?{...e,content:(0,w.r7)(e.content,320)}:e})))}),[D,F]);const[B,W]=(0,a.useState)(!1);if(U){const e=(0,n.__)("There was an error getting your inbox. Please try again.","woocommerce"),t=(0,n.__)("Reload","woocommerce"),o=()=>{window.location.reload()};return(0,a.createElement)(c.EmptyContent,{title:e,actionLabel:t,actionURL:null,actionCallback:o})}return F&&!b.length?null:(0,a.createElement)(a.Fragment,null,B&&(0,a.createElement)(g,{onClose:()=>{W(!1)}}),(0,a.createElement)("div",{className:"woocommerce-homepage-notes-wrapper"},!F&&!b.length&&(0,a.createElement)(c.Section,null,(0,a.createElement)(u.InboxNotePlaceholder,{className:"banner message-is-unread"})),(0,a.createElement)(c.Section,null,Boolean(b.length)&&(e=>{let{hasNotes:t,isBatchUpdating:o,notes:l,onDismiss:s,onNoteActionClick:p,onNoteVisible:_,setShowDismissAllModal:w,showHeader:E=!0,loadMoreNotes:g,allNotesFetched:y,notesHaveResolved:k,unreadNotesCount:S}=e;if(o)return;if(!t)return(0,a.createElement)(h.U,{className:"woocommerce-empty-activity-card",title:(0,n.__)("Your inbox is empty","woocommerce"),icon:!1},(0,n.__)("As things begin to happen in your store your inbox will start to fill up. You'll see things like achievements, new feature announcements, extension recommendations and more!","woocommerce"));N||((0,i.recordEvent)("inbox_panel_view",{total:l.length}),N=!0);const C=Object.keys(l).map((e=>l[e]));return(0,a.createElement)(r.Card,{size:"large"},E&&(0,a.createElement)(r.CardHeader,{size:"medium"},(0,a.createElement)("div",{className:"wooocommerce-inbox-card__header"},(0,a.createElement)(u.Text,{size:"20",lineHeight:"28px",variant:"title.small"},(0,n.__)("Inbox","woocommerce")),(0,a.createElement)(c.Badge,{count:S})),(0,a.createElement)(c.EllipsisMenu,{label:(0,n.__)("Inbox Notes Options","woocommerce"),renderContent:e=>{let{onToggle:t}=e;return(0,a.createElement)("div",{className:"woocommerce-inbox-card__section-controls"},(0,a.createElement)(r.Button,{onClick:()=>{w(!0),t()}},(0,n.__)("Dismiss all","woocommerce")))}})),(0,a.createElement)(m.Z,{role:"menu"},C.map((e=>{const{id:t,is_deleted:o}=e;return o?null:(0,a.createElement)(d.Z,{key:t,timeout:500,classNames:"woocommerce-inbox-message"},(0,a.createElement)(u.InboxNoteCard,{key:t,note:e,onDismiss:s,onNoteActionClick:p,onBodyLinkClick:f,onNoteVisible:_}))}))),y?null:k?(0,a.createElement)(r.CardFooter,{className:"wooocommerce-inbox-card__footer",size:"medium"},(0,a.createElement)(r.Button,{isPrimary:!0,onClick:()=>{g()}},C.length>v.per_page?(0,n.__)("Show more","woocommerce"):(0,n.__)("Show older","woocommerce"))):(0,a.createElement)(u.InboxNotePlaceholder,{className:"banner message-is-unread"}))})({loadMoreNotes:()=>{(0,i.recordEvent)("inbox_action_load_more",{quantity_shown:b.length}),p(o+10)},hasNotes:(0,w.kS)(b),isBatchUpdating:H,notes:b,onDismiss:async e=>{(0,i.recordEvent)("inbox_action_dismiss",{note_name:e.name,note_title:e.title,note_name_dismiss_all:!1,note_name_dismiss_confirmation:!0,screen:P});const t=e.id;try{await L(t),I("getNotes"),R("success",(0,n.__)("Message dismissed","woocommerce"),{actions:[{label:(0,n.__)("Undo","woocommerce"),onClick:async()=>{await z(t,{is_deleted:0}),I("getNotes")}}]})}catch(e){R("error",(0,n._n)("Message could not be dismissed","Messages could not be dismissed",1,"woocommerce"))}},onNoteActionClick:(e,t)=>{A(e.id,t.id)},onNoteVisible:e=>{M[e.id]||e.is_read||(O({...M,[e.id]:!0}),setTimeout((()=>{z(e.id,{is_read:!0})}),3e3)),(0,i.recordEvent)("inbox_note_view",{note_content:e.content,note_name:e.name,note_title:e.title,note_type:e.type,screen:P})},setShowDismissAllModal:W,showHeader:t,allNotesFetched:S,notesHaveResolved:F,unreadNotesCount:q}))))}},54989:(e,t,o)=>{t.Z=function(e){var t=e.size,o=void 0===t?24:t,a=e.onClick,l=(e.icon,e.className),s=function(e,t){if(null==e)return{};var o,a,n=function(e,t){if(null==e)return{};var o,a,n={},c=Object.keys(e);for(a=0;a<c.length;a++)o=c[a],0<=t.indexOf(o)||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)o=c[a],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,c),i=["gridicon","gridicons-star-outline",l,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return n.default.createElement("svg",r({className:i,height:o,width:o,onClick:a},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),n.default.createElement("g",null,n.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.041 3.374.139-2.647 2.092-.784.62.27.962.911 3.249-2.814-1.871-.83-.553-.83.552-2.814 1.871.911-3.249.27-.962-.784-.62-2.648-2.092 3.374-.139.997-.041.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.891 18.18 21l-2.002-7.141L22 9.257l-7.418-.305L12 2z"})))};var a,n=(a=o(99196))&&a.__esModule?a:{default:a},c=["size","onClick","icon","className"];function r(){return r=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)}},7725:(e,t,o)=>{t.Z=function(e){var t=e.size,o=void 0===t?24:t,a=e.onClick,l=(e.icon,e.className),s=function(e,t){if(null==e)return{};var o,a,n=function(e,t){if(null==e)return{};var o,a,n={},c=Object.keys(e);for(a=0;a<c.length;a++)o=c[a],0<=t.indexOf(o)||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)o=c[a],0<=t.indexOf(o)||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,c),i=["gridicon","gridicons-star",l,!!function(e){return 0==e%18}(o)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return n.default.createElement("svg",r({className:i,height:o,width:o,onClick:a},s,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),n.default.createElement("g",null,n.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var a,n=(a=o(99196))&&a.__esModule?a:{default:a},c=["size","onClick","icon","className"];function r(){return r=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)}},13903:(e,t,o)=>{e.exports=o.p+"93973815f7cd64d5f512.png"},29363:(e,t,o)=>{e.exports=o.p+"0e8ec0e45d8a1d55b30c.png"},19097:(e,t,o)=>{e.exports=o.p+"f574e970a917e4dff5ec.png"},58656:(e,t,o)=>{e.exports=o.p+"d11c9a0dc859f1236a96.png"}}]);